Class: ServiceResult
- Inherits:
-
Object
- Object
- ServiceResult
- Defined in:
- lib/service_result.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #failure? ⇒ Boolean
-
#initialize(object) ⇒ ServiceResult
constructor
A new instance of ServiceResult.
- #success? ⇒ Boolean
Constructor Details
#initialize(object) ⇒ ServiceResult
Returns a new instance of ServiceResult.
6 7 8 |
# File 'lib/service_result.rb', line 6 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/service_result.rb', line 4 def object @object end |
Instance Method Details
#failure? ⇒ Boolean
14 15 16 |
# File 'lib/service_result.rb', line 14 def failure? !success? end |
#success? ⇒ Boolean
10 11 12 |
# File 'lib/service_result.rb', line 10 def success? false end |