Class: Doorkeeper::DeviceAuthorizationGrant::Rails::Routes::Mapper
- Inherits:
-
Object
- Object
- Doorkeeper::DeviceAuthorizationGrant::Rails::Routes::Mapper
- Defined in:
- lib/doorkeeper/device_authorization_grant/rails/routes/mapper.rb
Overview
rubocop:disable Style/Documentation
Instance Method Summary collapse
- #as(alias_names = {}) ⇒ Object
- #controller(controller_names = {}) ⇒ Hash{Symbol => String}
-
#initialize(mapping = Mapping.new) ⇒ Mapper
constructor
A new instance of Mapper.
- #map(&block) ⇒ Mapping
- #skip_controllers(*controller_names) ⇒ Object
Constructor Details
Instance Method Details
#as(alias_names = {}) ⇒ Object
33 34 35 |
# File 'lib/doorkeeper/device_authorization_grant/rails/routes/mapper.rb', line 33 def as(alias_names = {}) @mapping.as.merge!(alias_names) end |
#controller(controller_names = {}) ⇒ Hash{Symbol => String}
23 24 25 |
# File 'lib/doorkeeper/device_authorization_grant/rails/routes/mapper.rb', line 23 def controller(controller_names = {}) @mapping.controllers.merge!(controller_names) end |
#map(&block) ⇒ Mapping
16 17 18 19 |
# File 'lib/doorkeeper/device_authorization_grant/rails/routes/mapper.rb', line 16 def map(&block) instance_eval(&block) if block @mapping end |
#skip_controllers(*controller_names) ⇒ Object
28 29 30 |
# File 'lib/doorkeeper/device_authorization_grant/rails/routes/mapper.rb', line 28 def skip_controllers(*controller_names) @mapping.skips = controller_names end |