Class: UseCase::Base
- Inherits:
-
Object
- Object
- UseCase::Base
- Includes:
- BaseClassMethod
- Defined in:
- lib/usecasing/base.rb
Overview
BaseClassMethod
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #failure(key, value) ⇒ Object
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
- #perform ⇒ Object
- #rollback ⇒ Object
Methods included from BaseClassMethod
Constructor Details
#initialize(context) ⇒ Base
Returns a new instance of Base.
57 58 59 |
# File 'lib/usecasing/base.rb', line 57 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
56 57 58 |
# File 'lib/usecasing/base.rb', line 56 def context @context end |
Instance Method Details
#failure(key, value) ⇒ Object
64 65 66 |
# File 'lib/usecasing/base.rb', line 64 def failure(key, value) @context.failure(key, value) end |
#perform ⇒ Object
61 |
# File 'lib/usecasing/base.rb', line 61 def perform; end |
#rollback ⇒ Object
62 |
# File 'lib/usecasing/base.rb', line 62 def rollback; end |