Class: Assently::Client::ErrorResult
- Inherits:
-
Object
- Object
- Assently::Client::ErrorResult
- Defined in:
- lib/assently/client.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(response) ⇒ ErrorResult
constructor
A new instance of ErrorResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ ErrorResult
Returns a new instance of ErrorResult.
120 121 122 |
# File 'lib/assently/client.rb', line 120 def initialize response @raw = response end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
118 119 120 |
# File 'lib/assently/client.rb', line 118 def raw @raw end |
Instance Method Details
#errors ⇒ Object
124 125 126 127 128 129 130 |
# File 'lib/assently/client.rb', line 124 def errors begin Array(JSON.parse(raw)["error"].values.join(" ")) rescue JSON::ParserError raw end end |
#success? ⇒ Boolean
132 133 134 |
# File 'lib/assently/client.rb', line 132 def success? false end |