Class: Interaktor::Error::OrganizerMissingPassedAttributeError

Inherits:
AttributeError
  • Object
show all
Defined in:
lib/interaktor/error/organizer_missing_passed_attribute_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interaktor, attribute) ⇒ OrganizerMissingPassedAttributeError

Returns a new instance of OrganizerMissingPassedAttributeError.

Parameters:

  • next_interaktor (Class)
  • attribute (Symbol)


7
8
9
10
11
# File 'lib/interaktor/error/organizer_missing_passed_attribute_error.rb', line 7

def initialize(interaktor, attribute)
  super(interaktor, [attribute])

  @attribute = attribute
end

Instance Attribute Details

#attributeSymbol (readonly)

Returns:

  • (Symbol)


3
4
5
# File 'lib/interaktor/error/organizer_missing_passed_attribute_error.rb', line 3

def attribute
  @attribute
end

Instance Method Details

#messageObject



13
14
15
16
17
18
19
20
# File 'lib/interaktor/error/organizer_missing_passed_attribute_error.rb', line 13

def message
  "    An organized \#{interaktor} interaktor requires a '\#{attribute}' input\n    attribute, but none of the interaktors that come before it in the\n    organizer list it as a success attribute, and the organizer does not list\n    it as a required attribute.\n  MESSAGE\nend\n".strip.tr("\n", " ")