Class: TochkaCyclopsApi::Result
- Inherits:
-
Object
- Object
- TochkaCyclopsApi::Result
- Defined in:
- lib/tochka_cyclops_api/result.rb
Overview
Displays the result of request
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Class Method Summary collapse
- .create(success, data = nil, error_message = nil) ⇒ Object
- .failure(error_message) ⇒ Object
- .success(data) ⇒ Object
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/tochka_cyclops_api/result.rb', line 6 def data @data end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
6 7 8 |
# File 'lib/tochka_cyclops_api/result.rb', line 6 def @error_message end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
6 7 8 |
# File 'lib/tochka_cyclops_api/result.rb', line 6 def success @success end |
Class Method Details
.create(success, data = nil, error_message = nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/tochka_cyclops_api/result.rb', line 8 def self.create(success, data = nil, = nil) @success = success @data = data @error_message = display_result end |