class SimpleInteractor

Constants

VERSION

Public Class Methods

expected_params(*params_names) click to toggle source
# File lib/simple_interactor.rb, line 5
def self.expected_params(*params_names)
  instance_variable_set :@params_names, params_names
end
new(args) click to toggle source
# File lib/simple_interactor.rb, line 13
def initialize(args)
  args.each_with_index do |value, index|
    params_names = self.class.instance_variable_get(:@params_names)
    instance_variable_set("@#{params_names[index]}", value)
  end
end
perform(*args) click to toggle source
# File lib/simple_interactor.rb, line 9
def self.perform(*args)
  new(args).perform
end