Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/hash_patch.rb

Overview

Hash extension for handling API response.

Instance Method Summary collapse

Instance Method Details

#errorObject

Get error element.


16
17
18
# File 'lib/core_ext/hash_patch.rb', line 16

def error
  self['error']
end

#idObject

Get id element.


12
13
14
# File 'lib/core_ext/hash_patch.rb', line 12

def id
  self['id']
end

#resultObject

Get result element.


4
5
6
# File 'lib/core_ext/hash_patch.rb', line 4

def result
  self['result']
end

#resultsObject

Get results element.


8
9
10
# File 'lib/core_ext/hash_patch.rb', line 8

def results
  self['results']
end