Class: Polars::DataType

Inherits:
Object
  • Object
show all
Defined in:
lib/polars/data_types.rb

Overview

Base class for all Polars data types.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.==(other) ⇒ Object



20
21
22
# File 'lib/polars/data_types.rb', line 20

def self.==(other)
  eql?(other) || other.is_a?(self)
end

.base_typeObject



4
5
6
# File 'lib/polars/data_types.rb', line 4

def self.base_type
  self
end

.nested?Boolean

Returns:



12
13
14
# File 'lib/polars/data_types.rb', line 12

def self.nested?
  false
end

Instance Method Details

#base_typeObject



8
9
10
# File 'lib/polars/data_types.rb', line 8

def base_type
  is_a?(DataType) ? self.class : self
end

#nested?Boolean

Returns:



16
17
18
# File 'lib/polars/data_types.rb', line 16

def nested?
  self.class.nested?
end