Class: Interactor::Initializer::CallMethods
- Inherits:
-
Object
- Object
- Interactor::Initializer::CallMethods
- Defined in:
- lib/interactor/initializer/call_methods.rb
Constant Summary collapse
- METHOD_NAMES =
%i(for with run).freeze
Class Method Summary collapse
Class Method Details
.for(target_class) ⇒ Object
4 5 6 7 8 |
# File 'lib/interactor/initializer/call_methods.rb', line 4 def self.for(target_class) METHOD_NAMES.each do |method_name| target_class.define_singleton_method(method_name) { |*args| new(*args).run } end end |