Module: Remitano::Client::Helper

Defined in:
lib/remitano/client/helper.rb

Class Method Summary collapse

Class Method Details

.parse_json(str) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/remitano/client/helper.rb', line 3

def self.parse_json(str)
  json = JSON.parse(str)
  if json.is_a? Array
    json.map do |hash|
      Hashie::Mash[hash]
    end
  else
    Hashie::Mash[json]
  end
end