Class: EasyshipRatesRubyApi::Mash

Inherits:
Hashie::Mash
  • Object
show all
Defined in:
lib/easyship/rates/ruby/api/mash.rb

Overview

The generalized pseudo-object that is returned for all query requests.

Class Method Summary collapse

Class Method Details

.from_json(json_string) ⇒ Easyship::Rates::Ruby::Mash

Convert a json string to a Mash

Parameters:

  • json_string (String)

Returns:

  • (Easyship::Rates::Ruby::Mash)


12
13
14
15
# File 'lib/easyship/rates/ruby/api/mash.rb', line 12

def self.from_json(json_string)
  result_hash = ::MultiJson.decode(json_string)
  new(result_hash)
end