Module: Sway::Mashable

Included in:
Base
Defined in:
lib/sway/mashable.rb

Instance Method Summary collapse

Instance Method Details

#create_mash_from(hash) ⇒ Object



9
10
11
# File 'lib/sway/mashable.rb', line 9

def create_mash_from(hash)
  Hashie::Mash.new(hash)
end

#create_mashes_from(array) ⇒ Object



5
6
7
# File 'lib/sway/mashable.rb', line 5

def create_mashes_from(array)
  array.inject([]) {|items, item| items << Hashie::Mash.new(item)}
end