Module: AttributesDSL::InstanceMethods
- Defined in:
- lib/attributes_dsl.rb
Overview
Defines instance methods for the hash of attributes and its initializer
Instance Attribute Summary collapse
-
#attributes ⇒ Hash
readonly
The hash of initialized attributes.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Object
Initializes the object and sets the hash of its [#attributes].
Instance Attribute Details
#attributes ⇒ Hash (readonly)
Returns the hash of initialized attributes.
84 85 86 |
# File 'lib/attributes_dsl.rb', line 84 def attributes @attributes end |
Instance Method Details
#initialize(attributes) ⇒ Object
Initializes the object and sets the hash of its [#attributes]
Uses attributes prepared by [.new]
92 93 94 |
# File 'lib/attributes_dsl.rb', line 92 def initialize(attributes) @attributes = attributes end |