Class: Iceberg::DecimalType
- Inherits:
-
PrimitiveType
- Object
- Type
- PrimitiveType
- Iceberg::DecimalType
- Defined in:
- lib/iceberg/types.rb
Instance Attribute Summary collapse
-
#precision ⇒ Object
readonly
Returns the value of attribute precision.
-
#scale ⇒ Object
readonly
Returns the value of attribute scale.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(precision, scale) ⇒ DecimalType
constructor
A new instance of DecimalType.
- #inspect ⇒ Object
Constructor Details
#initialize(precision, scale) ⇒ DecimalType
Returns a new instance of DecimalType.
32 33 34 35 |
# File 'lib/iceberg/types.rb', line 32 def initialize(precision, scale) @precision = precision @scale = scale end |
Instance Attribute Details
#precision ⇒ Object (readonly)
Returns the value of attribute precision.
30 31 32 |
# File 'lib/iceberg/types.rb', line 30 def precision @precision end |
#scale ⇒ Object (readonly)
Returns the value of attribute scale.
30 31 32 |
# File 'lib/iceberg/types.rb', line 30 def scale @scale end |
Instance Method Details
#==(other) ⇒ Object
37 38 39 |
# File 'lib/iceberg/types.rb', line 37 def ==(other) other.is_a?(self.class) && other.precision == @precision && other.scale == @scale end |
#inspect ⇒ Object
41 42 43 |
# File 'lib/iceberg/types.rb', line 41 def inspect "#<#{self.class.name} precision=#{@precision.inspect}, scale=#{@scale.inspect}>" end |