Class: RuboCop::Cop::Grape::RouteParamType
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Grape::RouteParamType
- Defined in:
- lib/rubocop/cop/grape/route_param_type.rb
Overview
Checks whether type is specified at points where ‘Grape::API#route_param` is called.
Constant Summary collapse
- MSG =
'Define Parameter Type'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/rubocop/cop/grape/route_param_type.rb', line 29 def on_send(node) return unless route_param?(node) = node.children.last.children return if .any? { |clild_node| include_key_type?(clild_node) } add_offense(node) end |