Class: Assently::Client::SuccessResult
- Inherits:
-
Object
- Object
- Assently::Client::SuccessResult
- Defined in:
- lib/assently/client.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
-
#initialize(response) ⇒ SuccessResult
constructor
A new instance of SuccessResult.
- #response ⇒ Object
- #success? ⇒ Boolean
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
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
98 99 100 |
# File 'lib/assently/client.rb', line 98 def raw @raw end |
Instance Method Details
#response ⇒ Object
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
112 113 114 |
# File 'lib/assently/client.rb', line 112 def success? true end |