class Builderator::Config::Attributes::Namespace
Define a namespace for attributes
Attributes
name[RW]
collection[R]
name[R]
Public Class Methods
create(namespace_name, &definition)
click to toggle source
Construct a new child-class to define the interface. The constructor accepts an attributes argument, which should be a sub-node of the root attribute-set.
# File lib/builderator/config/attributes.rb, line 286 def create(namespace_name, &definition) space = Class.new(self) space.name = namespace_name ## Define DSL interface space.instance_eval(&definition) if definition space end
new(attributes, options = {}, &block)
click to toggle source
Calls superclass method
Builderator::Config::Attributes::new
# File lib/builderator/config/attributes.rb, line 300 def initialize(attributes, options = {}, &block) super(attributes, options, &block) @name = options.fetch(:name, self.class.name) @collection = options[:collection] end