Sha256: 1037a5ca690a91467c458d69f61b92cda0e1dcc6719f6484a2bba7892d8d1390

Contents?: true

Size: 256 Bytes

Versions: 11

Compression:

Stored size: 256 Bytes

Contents

module Monolens
  module Lens
    class Location
      def initialize(parts = [])
        @parts = parts
      end

      def deeper(part)
        yield Location.new(@parts + [part])
      end

      def to_a
        @parts.dup
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
monolens-0.6.4 lib/monolens/lens/location.rb
monolens-0.6.3 lib/monolens/lens/location.rb
monolens-0.6.2 lib/monolens/lens/location.rb
monolens-0.6.1 lib/monolens/lens/location.rb
monolens-0.6.0 lib/monolens/lens/location.rb
monolens-0.5.3 lib/monolens/lens/location.rb
monolens-0.5.2 lib/monolens/lens/location.rb
monolens-0.5.1 lib/monolens/lens/location.rb
monolens-0.5.0 lib/monolens/lens/location.rb
monolens-0.4.0 lib/monolens/lens/location.rb
monolens-0.3.0 lib/monolens/lens/location.rb