Sha256: 9f81fe55e522ee52984246e3439f59b58e3bcba37cf54371914ebbd217fc99ef

Contents?: true

Size: 309 Bytes

Versions: 2

Compression:

Stored size: 309 Bytes

Contents

require 'pathname'

module Hike
  class Paths < NormalizedArray
    def initialize(root = ".")
      @root = Pathname.new(root)
      super()
    end

    def normalize_element(path)
      path = Pathname.new(path)
      path = @root.join(path) if path.relative?
      path.expand_path.to_s
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hike-0.5.1 lib/hike/paths.rb
hike-0.5.0 lib/hike/paths.rb