Class: OasHanami::RouteExtractor
- Inherits:
-
Object
- Object
- OasHanami::RouteExtractor
- Defined in:
- lib/oas_hanami/route_extractor.rb
Class Method Summary collapse
Class Method Details
.clean_route(route) ⇒ Object
14 15 16 |
# File 'lib/oas_hanami/route_extractor.rb', line 14 def clean_route(route) route.gsub("(.:format)", "").gsub(/:\w+/) { |match| "{#{match[1..]}}" } end |
.clear_cache ⇒ Object
10 11 12 |
# File 'lib/oas_hanami/route_extractor.rb', line 10 def clear_cache @host_routes = nil end |
.host_routes ⇒ Object
6 7 8 |
# File 'lib/oas_hanami/route_extractor.rb', line 6 def host_routes @host_routes ||= extract_host_routes end |