Module: Doorkeeper::Rails::AbstractRouter
- Extended by:
- ActiveSupport::Concern
- Included in:
- Routes
- Defined in:
- lib/doorkeeper/rails/routes/abstract_router.rb
Overview
Abstract router module that implements base behavior for generating and mapping Rails routes.
Could be reused in Doorkeeper extensions.
Instance Attribute Summary collapse
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
Instance Method Summary collapse
Instance Attribute Details
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
13 14 15 |
# File 'lib/doorkeeper/rails/routes/abstract_router.rb', line 13 def routes @routes end |
Instance Method Details
#generate_routes!(**_options) ⇒ Object
20 21 22 |
# File 'lib/doorkeeper/rails/routes/abstract_router.rb', line 20 def generate_routes!(**) raise NotImplementedError, "must be redefined for #{self.class.name}!" end |
#initialize(routes, mapper = Mapper.new, &block) ⇒ Object
15 16 17 18 |
# File 'lib/doorkeeper/rails/routes/abstract_router.rb', line 15 def initialize(routes, mapper = Mapper.new, &block) @routes = routes @mapping = mapper.map(&block) end |