Class: TCellAgent::Instrumentation::Rails::TCellRoute4
Constant Summary
collapse
- METHODS =
%w[DELETE GET HEAD OPTIONS PATCH POST PUT TRACE CONNECT].freeze
Instance Attribute Summary
Attributes inherited from TCellRoute
#route_destination, #route_id, #route_path, #route_path_raw
Instance Method Summary
collapse
Methods inherited from TCellRoute
#grape_route?, #initialize
Instance Method Details
#grape_routes ⇒ Object
70
71
72
73
74
75
76
|
# File 'lib/tcell_agent/rails/routes.rb', line 70
def grape_routes
if ::Rails::VERSION::MAJOR == 4 && ::Rails::VERSION::MINOR < 2
@route.app.routes
else
@route.app.app.routes
end
end
|
#report? ⇒ Boolean
62
63
64
|
# File 'lib/tcell_agent/rails/routes.rb', line 62
def report?
@route.constraints.key?(:request_method) || grape_route?
end
|
#route_methods ⇒ Object
66
67
68
|
# File 'lib/tcell_agent/rails/routes.rb', line 66
def route_methods
METHODS.select { |x| @route.verb.match(x) }
end
|