Class: Oat::Adapters::Siren::Action::Field
- Inherits:
-
Object
- Object
- Oat::Adapters::Siren::Action::Field
- Defined in:
- lib/oat/adapters/siren.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(name) ⇒ Field
constructor
A new instance of Field.
- #klass(value) ⇒ Object
Constructor Details
#initialize(name) ⇒ Field
Returns a new instance of Field.
93 94 95 |
# File 'lib/oat/adapters/siren.rb', line 93 def initialize(name) @data = { :name => name, :class => []} end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
91 92 93 |
# File 'lib/oat/adapters/siren.rb', line 91 def data @data end |
Instance Method Details
#klass(value) ⇒ Object
97 98 99 |
# File 'lib/oat/adapters/siren.rb', line 97 def klass(value) data[:class] << value end |