class Util

Public Class Methods

results(response) click to toggle source
# File lib/mavenlink/util.rb, line 4
def self.results(response)
  pp response
  response["results"].map do |result|
    key = result["key"]
    id = result["id"]
    response[key][id]
  end
end
stringify_keys(hash) click to toggle source
# File lib/mavenlink/util.rb, line 13
def self.stringify_keys(hash)
  new_hash = {}
  return new_hash unless hash.is_a? Hash

  hash.each do |k, v|
    new_hash[k.to_s] = v
  end

  new_hash
end