Class: Dry::ResourceRoutes
- Inherits:
-
Object
- Object
- Dry::ResourceRoutes
- Defined in:
- lib/dry/resource_routes.rb
Instance Method Summary collapse
-
#initialize(routes, path) ⇒ ResourceRoutes
constructor
A new instance of ResourceRoutes.
- #routes ⇒ Object
Constructor Details
#initialize(routes, path) ⇒ ResourceRoutes
Returns a new instance of ResourceRoutes.
3 4 5 6 |
# File 'lib/dry/resource_routes.rb', line 3 def initialize routes, path @routes = routes @path = path end |
Instance Method Details
#routes ⇒ Object
8 9 10 11 12 |
# File 'lib/dry/resource_routes.rb', line 8 def routes routes_for_path(@path).each_with_object([]) do |e, m| m << e.defaults[:action].to_sym end.uniq end |