Exception: Flame::Errors::RouteArgumentsOrderError

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

Overview

Error for Route initialization

Instance Method Summary collapse

Constructor Details

#initialize(path, wrong_ordered_arguments) ⇒ RouteArgumentsOrderError

Returns a new instance of RouteArgumentsOrderError.



7
8
9
10
# File 'lib/flame/errors/route_arguments_order_error.rb', line 7

def initialize(path, wrong_ordered_arguments)
	@path = path
	@wrong_ordered_arguments = wrong_ordered_arguments
end

Instance Method Details

#messageObject



12
13
14
15
16
# File 'lib/flame/errors/route_arguments_order_error.rb', line 12

def message
	"Path '#{@path}' should have" \
		" '#{@wrong_ordered_arguments.first}' argument before" \
		" '#{@wrong_ordered_arguments.last}'"
end