Method: Toaster::KeyValuePair.flat_attributes_from_hash
- Defined in:
- lib/toaster/model/key_value_pair.rb
.flat_attributes_from_hash(hash, clazz = KeyValuePair) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/toaster/model/key_value_pair.rb', line 41 def self.flat_attributes_from_hash(hash, clazz=KeyValuePair) result = [] return result if !hash SystemState.get_flat_attributes(hash).each do |key,value| result << clazz.new( :key => key, :value => value ) end return result end |