Module: OpenHAB::Core::EmulateHash
- Includes:
- Enumerable
- Included in:
- Configuration, Items::Metadata::Hash, Items::Metadata::NamespaceHash
- Defined in:
- lib/openhab/core/emulate_hash.rb
Overview
Make a class acts like a Ruby Hash that supports indifferent keys.
Methods that accepts keys will convert symbolic keys to string keys, but only shallowly. This key indifference does not extend to Hash return values, however. Hash return values will behave like a normal Hash which treats symbolic and string keys differently.
The including class must implement at least:
#to_map
to provide the hash-like data#replace
#store
- Other methods and mutators as applicable to the underlying storage.
Method Summary
Methods included from Enumerable
#all_groups, #all_members, #command, #command!, #decrease, #down, #equipments, #fast_forward, #groups, #increase, #locations, #member_of, #members, #move, #next, #not_member_of, #not_tagged, #off, #on, #pause, #play, #points, #previous, #refresh, #rewind, #stop, #tagged, #toggle, #up, #update!