Sha256: d852aa7c6aef713fc795d592768e367207abb78dd7d98c63b7805e95fe0a3cf4

Contents?: true

Size: 274 Bytes

Versions: 4

Compression:

Stored size: 274 Bytes

Contents

require 'hashie'
require 'multi_json'

module Iprofiler
  class Mash < ::Hashie::Mash

    # a simple helper to convert a json string to a Mash
    def self.from_json(json_string)
      result_hash = ::MultiJson.decode(json_string)
      new(result_hash)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iprofiler-0.1.3 lib/iprofiler/mash.rb
iprofiler-0.1.2 lib/iprofiler/mash.rb
iprofiler-0.1.1 lib/iprofiler/mash.rb
iprofiler-0.1.0 lib/iprofiler/mash.rb