Sha256: c483847af3f6604c21deeac9935f7de8711916787a73d6ec2e157639724ff040

Contents?: true

Size: 594 Bytes

Versions: 20

Compression:

Stored size: 594 Bytes

Contents

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

        def map(&block)
          self.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

20 entries across 20 versions & 1 rubygems

Version Path
capcoauth-0.7.0 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.6.3 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.6.2 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.6.1 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.6.0 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.5.1 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.5.0 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.4.0 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.3.3 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.3.2 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.3.1 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.3.0 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.2.3 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.2.2 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.2.1 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.2.0 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.1.4 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.1.3 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.1.2 lib/capcoauth/rails/routes/mapper.rb
capcoauth-0.1.1 lib/capcoauth/rails/routes/mapper.rb