Class: Doorkeeper::Rails::Routes::Mapper
- Inherits:
-
Object
- Object
- Doorkeeper::Rails::Routes::Mapper
- Defined in:
- lib/doorkeeper/rails/routes/mapper.rb
Instance Method Summary collapse
- #as(alias_names = {}) ⇒ Object
- #controllers(controller_names = {}) ⇒ Object
-
#initialize(mapping = Mapping.new) ⇒ Mapper
constructor
A new instance of Mapper.
- #map(&block) ⇒ Object
- #skip_controllers(*controller_names) ⇒ Object
Constructor Details
Instance Method Details
#as(alias_names = {}) ⇒ Object
24 25 26 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 24 def as(alias_names = {}) @mapping.as.merge!(alias_names) end |
#controllers(controller_names = {}) ⇒ Object
16 17 18 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 16 def controllers(controller_names = {}) @mapping.controllers.merge!(controller_names) end |
#map(&block) ⇒ Object
11 12 13 14 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 11 def map(&block) instance_eval(&block) if block @mapping end |
#skip_controllers(*controller_names) ⇒ Object
20 21 22 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 20 def skip_controllers(*controller_names) @mapping.skips = controller_names end |