Class: Bridgetown::Builders::PluginBuilder

Inherits:
Object
  • Object
show all
Includes:
DSL::Generators, DSL::HTTP, DSL::Helpers, DSL::Hooks, DSL::Inspectors, DSL::Liquid, DSL::Resources, Prioritizable
Defined in:
lib/bridgetown-builder/plugin.rb

Direct Known Subclasses

Bridgetown::Builder

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DSL::Resources

#add_resource, #define_resource_method, #permalink_placeholder, #placeholder_processors, #resource

Methods included from DSL::Liquid

#filters, #filters_context, #liquid_filter, #liquid_tag

Methods included from DSL::HTTP

#connection, #get

Methods included from DSL::Inspectors

#inspect_html, #inspect_xml, process_html, process_xml, setup_nokogiri, setup_nokolexbor

Methods included from DSL::Hooks

#add_data, #hook

Methods included from DSL::Helpers

#helper, #helpers

Methods included from DSL::Generators

#generator

Constructor Details

#initialize(name = nil, current_site = nil) ⇒ PluginBuilder

Returns a new instance of PluginBuilder.



40
41
42
43
44
45
# File 'lib/bridgetown-builder/plugin.rb', line 40

def initialize(name = nil, current_site = nil)
  self.functions = Set.new
  self.name = name || self.class.name
  self.site = current_site || Bridgetown::Current.site
  self.config = site.config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



32
33
34
# File 'lib/bridgetown-builder/plugin.rb', line 32

def config
  @config
end

#functionsObject

Returns the value of attribute functions.



32
33
34
# File 'lib/bridgetown-builder/plugin.rb', line 32

def functions
  @functions
end

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/bridgetown-builder/plugin.rb', line 32

def name
  @name
end

#siteObject

Returns the value of attribute site.



32
33
34
# File 'lib/bridgetown-builder/plugin.rb', line 32

def site
  @site
end

Class Method Details

.plugin_registrationsObject



35
36
37
# File 'lib/bridgetown-builder/plugin.rb', line 35

def plugin_registrations
  @plugin_registrations ||= Set.new
end