class Smarteru::Response
Attributes
data[R]
hash[R]
opts[R]
Public Class Methods
new(res, opts = {})
click to toggle source
Public Instance Methods
error()
click to toggle source
# File lib/smarteru/response.rb, line 34 def error errors = hash[:smarter_u][:errors] errors.is_a?(Hash) ? errors : nil end
result()
click to toggle source
# File lib/smarteru/response.rb, line 30 def result hash[:smarter_u][:info] end
success?()
click to toggle source
Return true/false based on the API response status
# File lib/smarteru/response.rb, line 24 def success? hash[:smarter_u][:result] == 'Success' rescue false end