Class: Bridgetown::Builder
- Inherits:
-
Bridgetown::Builders::PluginBuilder
- Object
- Bridgetown::Builders::PluginBuilder
- Bridgetown::Builder
- Extended by:
- ActiveSupport::DescendantsTracker
- Includes:
- ActiveSupport::Callbacks
- Defined in:
- bridgetown-builder/lib/bridgetown-builder/builder.rb
Overview
Superclass for a website’s SiteBuilder abstract class
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Bridgetown::Builders::PluginBuilder
#config, #functions, #name, #site
Class Method Summary collapse
-
.after_build ⇒ Object
-
.around_build ⇒ Object
-
.before_build ⇒ Object
-
.descendants ⇒ Object
-
.register ⇒ Object
Instance Method Summary collapse
Methods inherited from Bridgetown::Builders::PluginBuilder
#initialize, plugin_registrations
Methods included from Bridgetown::Builders::DSL::Resources
#add_resource, #define_resource_method, #permalink_placeholder, #placeholder_processors, #resource
Methods included from Bridgetown::Builders::DSL::Liquid
#filters, #filters_context, #liquid_filter, #liquid_tag
Methods included from Bridgetown::Builders::DSL::HTTP
Methods included from Bridgetown::Builders::DSL::Inspectors
#inspect_html, #inspect_xml, process_html, process_xml, setup_nokogiri, setup_nokolexbor
Methods included from Bridgetown::Builders::DSL::Hooks
Methods included from Bridgetown::Builders::DSL::Helpers
Methods included from Bridgetown::Builders::DSL::Generators
Methods included from Prioritizable
Constructor Details
This class inherits a constructor from Bridgetown::Builders::PluginBuilder
Class Method Details
.after_build ⇒ Object
20 21 22 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 20 def after_build(...) set_callback(:build, :after, ...) end |
.around_build ⇒ Object
24 25 26 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 24 def around_build(...) set_callback(:build, :around, ...) end |
.before_build ⇒ Object
16 17 18 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 16 def before_build(...) set_callback(:build, :before, ...) end |
.descendants ⇒ Object
38 39 40 41 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 38 def self.descendants site_builder_name = "SiteBuilder" super.reject { |klass| [site_builder_name].include?(klass.name) } end |
.register ⇒ Object
12 13 14 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 12 def register Bridgetown::Builders::PluginBuilder.plugin_registrations << self end |
Instance Method Details
#build_with_callbacks ⇒ Object
29 30 31 32 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 29 def build_with_callbacks run_callbacks(:build) { build } self end |
#inspect ⇒ Object
34 35 36 |
# File 'bridgetown-builder/lib/bridgetown-builder/builder.rb', line 34 def inspect "#<#{name}>" end |