Class: Oat::Adapters::Siren::Action::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/oat/adapters/siren.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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