Class: Kangaroo::Model::Field
- Inherits:
-
Object
- Object
- Kangaroo::Model::Field
- Includes:
- Attributes
- Defined in:
- lib/kangaroo/model/field.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, attributes = {}) ⇒ Field
constructor
A new instance of Field.
Methods included from Attributes
#attributes, #attributes=, #freeze, #read_attribute, #write_attribute
Constructor Details
#initialize(name, attributes = {}) ⇒ Field
Returns a new instance of Field.
15 16 17 18 19 20 21 22 |
# File 'lib/kangaroo/model/field.rb', line 15 def initialize name, attributes = {} @attributes = {} @name = name attributes.each do |key, val| write_attribute key, val end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/kangaroo/model/field.rb', line 8 def name @name end |