Class: Assently::Client::SuccessResult

Inherits:
Object
  • Object
show all
Defined in:
lib/assently/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ SuccessResult

Returns a new instance of SuccessResult.



100
101
102
# File 'lib/assently/client.rb', line 100

def initialize response
  @raw = response
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



98
99
100
# File 'lib/assently/client.rb', line 98

def raw
  @raw
end

Instance Method Details

#responseObject



104
105
106
107
108
109
110
# File 'lib/assently/client.rb', line 104

def response
  begin
    JSON.parse raw
  rescue JSON::ParserError
    raw
  end
end

#success?Boolean

Returns:

  • (Boolean)


112
113
114
# File 'lib/assently/client.rb', line 112

def success?
  true
end