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
arcabouco-0.2.13 vendor/bundle/gems/hike-1.2.3/lib/hike/extensions.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/hike-1.2.3/lib/hike/extensions.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/hike-1.2.3/lib/hike/extensions.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/hike-1.2.1/lib/hike/extensions.rb
hike-2.1.3 lib/hike/extensions.rb
hike-2.1.2 lib/hike/extensions.rb
hike-2.1.1 lib/hike/extensions.rb
hike-2.1.0 lib/hike/extensions.rb
hike-2.0.0 lib/hike/extensions.rb
challah-1.0.0 vendor/bundle/gems/hike-1.2.3/lib/hike/extensions.rb
swipe-rails-0.0.5 vendor/bundle/gems/hike-1.2.3/lib/hike/extensions.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
hike-1.2.3 lib/hike/extensions.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/hike-1.2.1/lib/hike/extensions.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/hike-1.2.1/lib/hike/extensions.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/hike-1.2.2/lib/hike/extensions.rb