Sha256: 0da6602c9038cc5bc722ee9bffa57f3b7517dcc2aaa3343c32cd7e45675e5d85

Contents?: true

Size: 507 Bytes

Versions: 104

Compression:

Stored size: 507 Bytes

Contents

require 'hike/normalized_array'

module Hike
  # `Extensions` is an internal collection for tracking extension names.
  class Extensions < NormalizedArray
    # Extensions added to this array are normalized with a leading
    # `.`.
    #
    #     extensions << "js"
    #     extensions << ".css"
    #
    #     extensions
    #     # => [".js", ".css"]
    #
    def normalize_element(extension)
      if extension[/^\./]
        extension
      else
        ".#{extension}"
      end
    end
  end
end

Version data entries

104 entries across 82 versions & 21 rubygems

Version Path
challah-0.6.1 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.6.0 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.5.4 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.5.3 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.5.2 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.5.1 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.5.0 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.4.1 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.4.0 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.3.5 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.3.4 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.3.3 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.3.2 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.3.1 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.3.0 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.2.1 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb
challah-0.2.0 vendor/bundle/gems/hike-1.2.1/lib/hike/extensions.rb