Class: RCracy::Response
- Inherits:
-
Object
- Object
- RCracy::Response
- Defined in:
- lib/rcracy/response.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #errors? ⇒ Boolean
-
#initialize(attrs) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(attrs) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 12 |
# File 'lib/rcracy/response.rb', line 7 def initialize(attrs) @error_code = attrs['error'] @key = attrs['key'] end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
5 6 7 |
# File 'lib/rcracy/response.rb', line 5 def error_code @error_code end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/rcracy/response.rb', line 5 def key @key end |
Instance Method Details
#errors? ⇒ Boolean
14 15 16 |
# File 'lib/rcracy/response.rb', line 14 def errors? return @error_code == 0 ? false : true; end |