Class: Flame::ActionsValidator
- Inherits:
-
Object
- Object
- Flame::ActionsValidator
- Defined in:
- lib/flame/validators.rb
Overview
Compare actions from routes and from controller
Instance Method Summary collapse
-
#initialize(route_refine) ⇒ ActionsValidator
constructor
A new instance of ActionsValidator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(route_refine) ⇒ ActionsValidator
Returns a new instance of ActionsValidator.
60 61 62 63 |
# File 'lib/flame/validators.rb', line 60 def initialize(route_refine) @routes = route_refine.routes @ctrl = route_refine.ctrl end |
Instance Method Details
#valid? ⇒ Boolean
65 66 67 68 69 |
# File 'lib/flame/validators.rb', line 65 def valid? @routes_actions = @routes.map { |route| route[:action] } @ctrl_actions = @ctrl.public_instance_methods(false) no_extra_routes_actions? && no_extra_controller_actions? end |