Class: PayDirt::Result
- Inherits:
-
Object
- Object
- PayDirt::Result
- Defined in:
- lib/pay_dirt/result.rb
Overview
Provides developers with a [re]usable result object for their service objects to return.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options) ⇒ PayDirt::Result
constructor
The response from a use case execution.
- #successful? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ PayDirt::Result
The response from a use case execution
Every use case should return a Result after it runs.
19 20 21 22 |
# File 'lib/pay_dirt/result.rb', line 19 def initialize() @success = [:success] @data = [:data] end |
Instance Method Details
#data ⇒ Object
30 31 32 |
# File 'lib/pay_dirt/result.rb', line 30 def data @data end |
#successful? ⇒ Boolean
25 26 27 |
# File 'lib/pay_dirt/result.rb', line 25 def successful? !!@success end |