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
- #before ⇒ Object
- #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.
61 62 63 |
# File 'lib/usecasing/base.rb', line 61 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
60 61 62 |
# File 'lib/usecasing/base.rb', line 60 def context @context end |
Instance Method Details
#before ⇒ Object
65 |
# File 'lib/usecasing/base.rb', line 65 def before; end |
#failure(key, value) ⇒ Object
69 70 71 |
# File 'lib/usecasing/base.rb', line 69 def failure(key, value) @context.failure(key, value) end |
#perform ⇒ Object
66 |
# File 'lib/usecasing/base.rb', line 66 def perform; end |
#rollback ⇒ Object
67 |
# File 'lib/usecasing/base.rb', line 67 def rollback; end |