Sha256: 17daf73b3fd5d0b943c47642d121aecd72df3ff70d4caa2f5a47a3cb11f23c36

Contents?: true

Size: 359 Bytes

Versions: 1

Compression:

Stored size: 359 Bytes

Contents

# encoding: utf-8
module Piglet
  module Field
    class MapValue
      include Field
      
      def initialize(key, parent)
        @key, @predecessors = key, [parent]
      end
      
      def to_s(inner=false)
        expr = if inner then @predecessors.first.field_alias else @predecessors.first end
        "#{expr}##{@key}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
piglet-0.3.0 lib/piglet/field/map_value.rb