Class: Secure::Response
- Inherits:
-
Object
- Object
- Secure::Response
- Defined in:
- lib/secure/response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error, value) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(error, value) ⇒ Response
Returns a new instance of Response.
5 6 7 8 |
# File 'lib/secure/response.rb', line 5 def initialize(error, value) @error = error @value = value end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
3 4 5 |
# File 'lib/secure/response.rb', line 3 def error @error end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/secure/response.rb', line 3 def value @value end |
Class Method Details
Instance Method Details
#success? ⇒ Boolean
10 11 12 |
# File 'lib/secure/response.rb', line 10 def success? error.nil? end |