Sha256: fbb93ba97b8c4ece5fe19422cee6f686be8697edf470531597f119d8519479e1

Contents?: true

Size: 600 Bytes

Versions: 5

Compression:

Stored size: 600 Bytes

Contents

module LinkThumbnailer
  module Rails
    class Routes
      class Mapping

        attr_accessor :controllers, :as, :skips

        def initialize
          @controllers = {
            :previews => 'link_thumbnailer/previews'
          }

          @as = {
            :previews => :preview
          }

          @skips = []
        end

        def [](routes)
          {
            :controllers => @controllers[routes],
            :as => @as[routes]
          }
        end

        def skipped?(controller)
          return @skips.include?(controller)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
link_thumbnailer-1.0.5 lib/link_thumbnailer/rails/routes/mapping.rb
link_thumbnailer-1.0.4 lib/link_thumbnailer/rails/routes/mapping.rb
link_thumbnailer-1.0.3 lib/link_thumbnailer/rails/routes/mapping.rb
link_thumbnailer-1.0.2 lib/link_thumbnailer/rails/routes/mapping.rb
link_thumbnailer-1.0.0 lib/link_thumbnailer/rails/routes/mapping.rb