Sha256: dea352a4685f7634dd42d2b9f90bcdcbb3d645193ffec4600e2407fd14cef388

Contents?: true

Size: 329 Bytes

Versions: 2

Compression:

Stored size: 329 Bytes

Contents

module Configurations
  class Path
    def initialize(path = [])
      @path = path
    end

    def add(*path)
      Path.new(@path + path)
    end

    def reduce(initial, &block)
      @path.reduce(initial, &block)
    end

    def to_s
      @path.join(".")
    end
    alias :inspect :to_s
    alias :print :to_s

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
configurations-2.2.2 lib/configurations/path.rb
configurations-2.2.1 lib/configurations/path.rb