Class: Flame::Validators::RouteArgumentsValidator

Inherits:
Object
  • Object
show all
Includes:
Memery
Defined in:
lib/flame/validators.rb

Overview

Compare arguments from path and from controller’s action

Instance Method Summary collapse

Constructor Details

#initialize(ctrl, path, action) ⇒ RouteArgumentsValidator

Create a new instance of validator

Parameters:



16
17
18
19
20
# File 'lib/flame/validators.rb', line 16

def initialize(ctrl, path, action)
  @ctrl = ctrl
  @path = Flame::Path.new(path)
  @action = action
end

Instance Method Details

#validate!true, false

Validate

Returns:

  • (true, false)

    valid or raise an error



24
25
26
# File 'lib/flame/validators.rb', line 24

def validate!
  extra_validate! && order_validate!
end