Class: Fondy::Response
Instance Method Summary
collapse
#error?, #initialize
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *_args) ⇒ Object
20
21
22
|
# File 'lib/fondy/response.rb', line 20
def method_missing(method, *_args)
response[method] || super
end
|
Instance Method Details
#error_code ⇒ Object
12
13
14
|
# File 'lib/fondy/response.rb', line 12
def error_code
response[:error_code]
end
|
#error_message ⇒ Object
16
17
18
|
# File 'lib/fondy/response.rb', line 16
def error_message
response[:error_message]
end
|
#respond_to_missing?(method, *_args) ⇒ Boolean
24
25
26
|
# File 'lib/fondy/response.rb', line 24
def respond_to_missing?(method, *_args)
response.key?(method)
end
|
#success? ⇒ Boolean
8
9
10
|
# File 'lib/fondy/response.rb', line 8
def success?
response[:response_status] == 'success'
end
|
#to_h ⇒ Object
4
5
6
|
# File 'lib/fondy/response.rb', line 4
def to_h
response
end
|