Sha256: 23034a07df282fdd7d35b64f40c7ed389e11760f946c1a1f44d929bc83d76f09

Contents?: true

Size: 240 Bytes

Versions: 1

Compression:

Stored size: 240 Bytes

Contents

require 'hashie'

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sway-0.0.1 lib/sway/mashable.rb