Class: Egree::Client::SuccessResult
- Inherits:
-
Object
- Object
- Egree::Client::SuccessResult
- Defined in:
- lib/egree/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.
77 78 79 |
# File 'lib/egree/client.rb', line 77 def initialize response @raw = response end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
75 76 77 |
# File 'lib/egree/client.rb', line 75 def raw @raw end |
Instance Method Details
#response ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/egree/client.rb', line 81 def response begin JSON.parse raw rescue JSON::ParserError raw end end |
#success? ⇒ Boolean
89 90 91 |
# File 'lib/egree/client.rb', line 89 def success? true end |