Class: Makwa::ReturningInteraction Abstract

Inherits:
Interaction
  • Object
show all
Defined in:
lib/makwa/returning_interaction.rb

Overview

This class is abstract.

Override #execute_returning and call #returning in the class body, passing in the symbol of the input you want returned. Guaranteed to return the returning input, with interaction errors merged into it.

Defined Under Namespace

Classes: NotActiveModelErrorable, ReturnFilterInexistent, ReturningFilterNotSpecified

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Interaction

#calling_interaction, #calling_interactions, #debug, #id_marker, #indent, #return_if_errors!

Class Method Details

.returning(return_filter) ⇒ Object

Parameters:

  • return_filter (Symbol)

    Name of the input filter to be returned



25
26
27
# File 'lib/makwa/returning_interaction.rb', line 25

def returning(return_filter)
  @return_filter = return_filter
end

.run_returning!(*args) ⇒ Object

Returns:

  • (Object)


20
21
22
# File 'lib/makwa/returning_interaction.rb', line 20

def run_returning!(*args)
  new(*args).send(:run_returning!)
end

Instance Method Details

#execute_returningObject

This method is abstract.

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/makwa/returning_interaction.rb', line 33

def execute_returning
  raise NotImplementedError, "You need to implemented the method #execute_returning in your interaction."
end