Class: Polars::List
- Inherits:
-
NestedType
- Object
- DataType
- NestedType
- Polars::List
- Defined in:
- lib/polars/data_types.rb
Overview
Nested list/array type.
Instance Attribute Summary collapse
-
#inner ⇒ Object
readonly
Returns the value of attribute inner.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(inner) ⇒ List
constructor
A new instance of List.
- #to_s ⇒ Object
Constructor Details
#initialize(inner) ⇒ List
Returns a new instance of List.
437 438 439 |
# File 'lib/polars/data_types.rb', line 437 def initialize(inner) @inner = Utils.rb_type_to_dtype(inner) end |
Instance Attribute Details
#inner ⇒ Object (readonly)
Returns the value of attribute inner.
435 436 437 |
# File 'lib/polars/data_types.rb', line 435 def inner @inner end |
Instance Method Details
#==(other) ⇒ Object
441 442 443 444 445 446 447 448 449 |
# File 'lib/polars/data_types.rb', line 441 def ==(other) if other.eql?(List) true elsif other.is_a?(List) @inner.nil? || other.inner.nil? || @inner == other.inner else false end end |
#to_s ⇒ Object
451 452 453 |
# File 'lib/polars/data_types.rb', line 451 def to_s "#{self.class.name}(#{inner})" end |