Class: Iceberg::MapType

Inherits:
Type
  • Object
show all
Defined in:
lib/iceberg/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key_field, value_field) ⇒ MapType

Returns a new instance of MapType.



124
125
126
127
# File 'lib/iceberg/types.rb', line 124

def initialize(key_field, value_field)
  @key_field = key_field
  @value_field = value_field
end

Instance Attribute Details

#key_fieldObject (readonly)

Returns the value of attribute key_field.



122
123
124
# File 'lib/iceberg/types.rb', line 122

def key_field
  @key_field
end

#value_fieldObject (readonly)

Returns the value of attribute value_field.



122
123
124
# File 'lib/iceberg/types.rb', line 122

def value_field
  @value_field
end

Instance Method Details

#==(other) ⇒ Object



129
130
131
# File 'lib/iceberg/types.rb', line 129

def ==(other)
  other.is_a?(self.class) && other.key_field == @key_field && other.value_field == @value_field
end

#inspectObject



133
134
135
# File 'lib/iceberg/types.rb', line 133

def inspect
  "#<#{self.class.name} key_field=#{@key_field.inspect}, value_field=#{@value_field.inspect}>"
end