Sha256: c28a506dee8dd3432d10f471f2ba9127be7b4c1442d743f4f68ce2c57a5d3e4c

Contents?: true

Size: 631 Bytes

Versions: 26

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  module Rails
    class Routes # :nodoc:
      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

26 entries across 26 versions & 1 rubygems

Version Path
doorkeeper-5.8.1 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.8.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.7.1 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.7.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.9 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.8 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.7 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.6 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.5 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.4 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.3 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.2 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.1 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.0.rc2 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.6.0.rc1 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.5.4 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.5.3 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.5.2 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.5.1 lib/doorkeeper/rails/routes/mapper.rb