Class: Iceberg::FixedType

Inherits:
PrimitiveType show all
Defined in:
lib/iceberg/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(length) ⇒ FixedType

Returns a new instance of FixedType.



73
74
75
# File 'lib/iceberg/types.rb', line 73

def initialize(length)
  @length = length
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



71
72
73
# File 'lib/iceberg/types.rb', line 71

def length
  @length
end

Instance Method Details

#==(other) ⇒ Object



77
78
79
# File 'lib/iceberg/types.rb', line 77

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

#inspectObject



81
82
83
# File 'lib/iceberg/types.rb', line 81

def inspect
  "#<#{self.class.name} length=#{@length.inspect}>"
end