Module: Bizness::Operation
- Defined in:
- lib/bizness/operation.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
2 3 4 |
# File 'lib/bizness/operation.rb', line 2 def error @error end |
Instance Method Details
#aborted? ⇒ Boolean
17 18 19 |
# File 'lib/bizness/operation.rb', line 17 def aborted? !successful? end |
#call ⇒ Object
9 10 11 |
# File 'lib/bizness/operation.rb', line 9 def call raise NotImplementedError end |
#call! ⇒ Object
4 5 6 7 |
# File 'lib/bizness/operation.rb', line 4 def call! run successful? end |
#successful? ⇒ Boolean
13 14 15 |
# File 'lib/bizness/operation.rb', line 13 def successful? error.nil? end |
#to_h ⇒ Object
21 22 23 |
# File 'lib/bizness/operation.rb', line 21 def to_h {} end |