Exception: SweetActions::Exceptions::ActionNotFound

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sweet_actions/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ ActionNotFound

Returns a new instance of ActionNotFound.



8
9
10
11
# File 'lib/sweet_actions/exceptions.rb', line 8

def initialize(args = {})
  @path = args.fetch(:path, '')
  @class_name = args.fetch(:class_name, '')
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



6
7
8
# File 'lib/sweet_actions/exceptions.rb', line 6

def class_name
  @class_name
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/sweet_actions/exceptions.rb', line 6

def path
  @path
end

Instance Method Details

#messageObject



13
14
15
# File 'lib/sweet_actions/exceptions.rb', line 13

def message
  "Action class not found. Please make sure #{class_name} exists at app/actions/#{path}."
end