Class: RubyHome::HTTP::CharacteristicValueSerializer
- Inherits:
-
Object
- Object
- RubyHome::HTTP::CharacteristicValueSerializer
show all
- Includes:
- ObjectSerializer
- Defined in:
- lib/ruby_home/http/serializers/characteristic_value_serializer.rb
Instance Method Summary
collapse
#initialize, #serializable_hash, #serialized_json
Instance Method Details
#record_hash(characteristic) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/ruby_home/http/serializers/characteristic_value_serializer.rb', line 12
def record_hash(characteristic)
{
'aid' => characteristic.accessory_id,
'iid' => characteristic.instance_id,
'value' => characteristic.value,
}
end
|
#root ⇒ Object
8
9
10
|
# File 'lib/ruby_home/http/serializers/characteristic_value_serializer.rb', line 8
def root
'characteristics'
end
|