Class: EasyshipRatesRubyApi::Mash
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- EasyshipRatesRubyApi::Mash
- 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
-
.from_json(json_string) ⇒ Easyship::Rates::Ruby::Mash
Convert a json string to a Mash.
- .override_logging ⇒ Object
Class Method Details
.from_json(json_string) ⇒ Easyship::Rates::Ruby::Mash
Convert a json string to a 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 |
.override_logging ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/easyship/rates/ruby/api/mash.rb', line 17 def self.override_logging require 'hashie/version' return unless Gem::Version.new(Hashie::VERSION) >= Gem::Version.new('3.5.0') if respond_to?(:disable_warnings) disable_warnings else define_method(:log_built_in_message) { |*| } private :log_built_in_message end end |