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.
92 93 94 |
# File 'lib/assently/client.rb', line 92 def initialize response @raw = response end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
90 91 92 |
# File 'lib/assently/client.rb', line 90 def raw @raw end |
Instance Method Details
#response ⇒ Object
96 97 98 99 100 101 102 |
# File 'lib/assently/client.rb', line 96 def response begin JSON.parse raw rescue JSON::ParserError raw end end |
#success? ⇒ Boolean
104 105 106 |
# File 'lib/assently/client.rb', line 104 def success? true end |