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

Create a new instance of error

Parameters:

  • path (Flame::Path, String)

    path with wrong arguments order

  • wrong_ordered_arguments (Array<Symbol>)

    two wrong ordered arguments



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

def initialize(path, wrong_ordered_arguments)
	super(<<~MESSAGE.chomp)
		Path '#{path}' should have '#{wrong_ordered_arguments.first}' argument before '#{wrong_ordered_arguments.last}'
	MESSAGE
end