Sha256: 71b4e3ec1ef2e088a3acf1bafe0a2275d505a354ed3bcf919ac444886277c89b

Contents?: true

Size: 590 Bytes

Versions: 4

Compression:

Stored size: 590 Bytes

Contents

module Doorkeeper
  module Rails
    class Routes
      class Mapper
        def initialize(mapping = Mapping.new)
          @mapping = mapping
        end

        def map(&block)
          instance_eval(&block) if block
          @mapping
        end

        def controllers(controller_names = {})
          @mapping.controllers.merge!(controller_names)
        end

        def skip_controllers(*controller_names)
          @mapping.skips = controller_names
        end

        def as(alias_names = {})
          @mapping.as.merge!(alias_names)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
doorkeeper-4.2.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-4.1.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-4.0.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-4.0.0.rc4 lib/doorkeeper/rails/routes/mapper.rb