Module: Interceptors::UseCaseCore::ClassMethods
- Defined in:
- lib/interceptors/use_case_core.rb
Instance Method Summary collapse
- #call(input = {}, **kwargs) ⇒ Object
- #inherited(subclass) ⇒ Object
- #interceptors ⇒ Object
- #use(interceptor) ⇒ Object
Instance Method Details
#call(input = {}, **kwargs) ⇒ Object
21 22 23 |
# File 'lib/interceptors/use_case_core.rb', line 21 def call(input = {}, **kwargs) new.call(input, **kwargs) end |
#inherited(subclass) ⇒ Object
25 26 27 28 |
# File 'lib/interceptors/use_case_core.rb', line 25 def inherited(subclass) super subclass.instance_variable_set(:@interceptors, interceptors.dup) end |
#interceptors ⇒ Object
12 13 14 |
# File 'lib/interceptors/use_case_core.rb', line 12 def interceptors @interceptors ||= [] end |
#use(interceptor) ⇒ Object
16 17 18 19 |
# File 'lib/interceptors/use_case_core.rb', line 16 def use(interceptor) interceptors << interceptor self end |