Class: Mixture::AttributeList
- Inherits:
-
Object
- Object
- Mixture::AttributeList
- Extended by:
- Forwardable
- Includes:
- Comparable, Enumerable
- Defined in:
- lib/mixture/attribute_list.rb
Overview
A list of attributes.
Instance Attribute Summary collapse
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #create(name, options = {}) ⇒ Object
-
#initialize ⇒ AttributeList
constructor
A new instance of AttributeList.
Constructor Details
#initialize ⇒ AttributeList
Returns a new instance of AttributeList.
19 20 21 22 23 |
# File 'lib/mixture/attribute_list.rb', line 19 def initialize @list = {} @options = {} @callbacks = Hash.new { |h, k| h[k] = [] } end |
Instance Attribute Details
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
17 18 19 |
# File 'lib/mixture/attribute_list.rb', line 17 def callbacks @callbacks end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
16 17 18 |
# File 'lib/mixture/attribute_list.rb', line 16 def @options end |