Module: Interaction::ClassMethods

Defined in:
lib/interaction.rb

Instance Method Summary collapse

Instance Method Details

#perform(*args) ⇒ Object

Executes and returns the use case

A use case object is instantiated with the supplied arguments, perform is called and the object is returned.

Parameters:

  • args (*args)

    Arguments to initialize the use case with

Returns:

  • (Object)

    returns the use case object

Since:

  • 0.0.1



48
49
50
51
52
# File 'lib/interaction.rb', line 48

def perform(*args)
  new(*args).tap do |use_case|
    use_case.perform
  end
end