class Bridgetown::Builders::PluginBuilder
Attributes
config[RW]
functions[RW]
name[RW]
site[RW]
Public Class Methods
new(name, current_site = nil)
click to toggle source
# File lib/bridgetown-builder/plugin.rb, line 19 def initialize(name, current_site = nil) self.functions = Set.new self.name = name self.site = current_site || Bridgetown.sites.first self.config = if defined?(self.class::CONFIG_DEFAULTS) Bridgetown::Utils.deep_merge_hashes( self.class::CONFIG_DEFAULTS.with_dot_access, site.config ) else site.config end end
Public Instance Methods
doc(path, &block)
click to toggle source
# File lib/bridgetown-builder/plugin.rb, line 37 def doc(path, &block) DocumentsGenerator.add(path, block) end
inspect()
click to toggle source
# File lib/bridgetown-builder/plugin.rb, line 33 def inspect "#{name} (Hook)" end