Module: Interactor::Initializer::ClassMethods

Defined in:
lib/interactor/initializer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.initialize_with(*attributes) ⇒ Object



26
27
28
29
# File 'lib/interactor/initializer.rb', line 26

def initialize_with(*attributes)
  Interactor::Initializer::Initialize.for(self, attributes)
  Interactor::Initializer::AttrReaders.for(self, attributes)
end

.initialize_with_keyword_params(*attributes) ⇒ Object



31
32
33
34
# File 'lib/interactor/initializer.rb', line 31

def initialize_with_keyword_params(*attributes)
  Interactor::Initializer::Initialize.for(self, attributes, keyword_params: true)
  Interactor::Initializer::AttrReaders.for(self, attributes)
end

Instance Method Details

#for(*args) ⇒ Object



12
13
14
# File 'lib/interactor/initializer.rb', line 12

def for(*args)
  new(*args).run
end

#run(*args) ⇒ Object



20
21
22
# File 'lib/interactor/initializer.rb', line 20

def run(*args)
  new(*args).run
end

#with(*args) ⇒ Object



16
17
18
# File 'lib/interactor/initializer.rb', line 16

def with(*args)
  new(*args).run
end