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
22 23 24 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 22 def as(alias_names = {}) @mapping.as.merge!(alias_names) end |
#controllers(controller_names = {}) ⇒ Object
14 15 16 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 14 def controllers(controller_names = {}) @mapping.controllers.merge!(controller_names) end |
#map(&block) ⇒ Object
9 10 11 12 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 9 def map(&block) self.instance_eval(&block) if block @mapping end |
#skip_controllers(*controller_names) ⇒ Object
18 19 20 |
# File 'lib/doorkeeper/rails/routes/mapper.rb', line 18 def skip_controllers(*controller_names) @mapping.skips = controller_names end |