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.5.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.5.0.rc2 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.5.0.rc1 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.4.0 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.4.0.rc2 lib/doorkeeper/rails/routes/mapper.rb
doorkeeper-5.4.0.rc1 lib/doorkeeper/rails/routes/mapper.rb