Exception: Daredevil::Errors::UnknownAction

Inherits:
StandardError
  • Object
show all
Defined in:
lib/daredevil/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action) ⇒ UnknownAction

Returns a new instance of UnknownAction.



30
31
32
33
# File 'lib/daredevil/errors.rb', line 30

def initialize(action)
  @action = action
  super(message)
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



28
29
30
# File 'lib/daredevil/errors.rb', line 28

def action
  @action
end

Instance Method Details

#messageObject



35
36
37
38
# File 'lib/daredevil/errors.rb', line 35

def message
  "Unknown controller action '#{action}'.\n"\
  "Accepted actions are #{Daredevil::Responder::ACTIONS.join(', ')}"
end