Class: DeadSimpleCMS::Group::Configuration
- Inherits:
-
Object
- Object
- DeadSimpleCMS::Group::Configuration
- Includes:
- Presenter::RenderMixin, Util::Identifier
- Defined in:
- lib/dead_simple_cms/group/configuration.rb
Instance Attribute Summary collapse
-
#attribute_arguments ⇒ Object
readonly
Returns the value of attribute attribute_arguments.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identifier, options = {}, &block) ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Presenter::RenderMixin
#display, #presenter_class, #render, #render_proc
Constructor Details
#initialize(identifier, options = {}, &block) ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 |
# File 'lib/dead_simple_cms/group/configuration.rb', line 12 def initialize(identifier, ={}, &block) super(identifier, ) @options = @attribute_arguments = {} instance_eval(&block) end |
Instance Attribute Details
#attribute_arguments ⇒ Object (readonly)
Returns the value of attribute attribute_arguments.
10 11 12 |
# File 'lib/dead_simple_cms/group/configuration.rb', line 10 def attribute_arguments @attribute_arguments end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/dead_simple_cms/group/configuration.rb', line 10 def @options end |
Class Method Details
.define_attribute_builder_method(klass) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/dead_simple_cms/group/configuration.rb', line 19 def self.define_attribute_builder_method(klass) class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{klass.builder_method_name}(identifier, options={}) attribute_arguments[identifier] = [#{klass.builder_method_name.inspect}, options] end RUBY end |