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
68
69
70
71
72
73
74
|
# File 'lib/tcell_agent/rails/routes.rb', line 68
def grape_routes
if ::Rails::VERSION::MAJOR == 4 && ::Rails::VERSION::MINOR < 2
@route.app.routes
else
@route.app.app.routes
end
end
|
#report? ⇒ Boolean
60
61
62
|
# File 'lib/tcell_agent/rails/routes.rb', line 60
def report?
@route.constraints.key?(:request_method) || grape_route?
end
|
#route_methods ⇒ Object
64
65
66
|
# File 'lib/tcell_agent/rails/routes.rb', line 64
def route_methods
METHODS.select { |x| @route.verb.match(x) }
end
|