Class: Util
- Inherits:
-
Object
- Object
- Util
- Defined in:
- lib/mavenlink/util.rb
Class Method Summary collapse
Class Method Details
.results(response) ⇒ Object
4 5 6 7 8 9 10 11 |
# 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) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# 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 |