class Bigbank::Client::Result
Attributes
response[RW]
Public Class Methods
new(response)
click to toggle source
# File lib/bigbank/client/result.rb, line 6 def initialize(response) @response = response end
Public Instance Methods
errors?()
click to toggle source
Public: result is a failure
return @boolean
# File lib/bigbank/client/result.rb, line 20 def errors? !success? end
method_missing(name, *args, &block)
click to toggle source
Allows us to work directly with the result in a more natural way e.g. use enumerator methods, nil check etc.
# File lib/bigbank/client/result.rb, line 26 def method_missing(name, *args, &block) response.body.send(name, *args, &block) end
success?()
click to toggle source
Public: result is a success
return @boolean
# File lib/bigbank/client/result.rb, line 13 def success? response.status == 200 end