Class: Hike::Extensions

### Home Classes Methods

### In Files

- lib/hike/extensions.rb

### Parent

NormalizedArray

### Methods

- #normalize_element

### Class/Module Index

Quicksearch

- Hike
- Hike::Extensions
- Hike::Index
- Hike::NormalizedArray
- Hike::Paths
- Hike::Trail

No matching classes.

# Hike::Extensions

`Extensions` is an internal collection for tracking extension names.

### Public Instance Methods

normalize_element(extension) click to toggle source

Extensions added to this array are normalized with a leading `.`.

    extensions << "js"
    extensions << ".css"

    extensions
    # => [".js", ".css"]

    # File lib/hike/extensions.rb, line 15
    def normalize_element(extension)
      if extension[/^\./]
        extension
      else
        ".#{extension}"
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.