Class: Polars::Field
- Inherits:
-
Object
- Object
- Polars::Field
- Defined in:
- lib/polars/data_types.rb
Overview
Definition of a single field within a Struct
DataType.
Instance Attribute Summary collapse
-
#dtype ⇒ Object
readonly
Returns the value of attribute dtype.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, dtype) ⇒ Field
constructor
A new instance of Field.
- #to_s ⇒ Object
Constructor Details
#initialize(name, dtype) ⇒ Field
Returns a new instance of Field.
422 423 424 425 |
# File 'lib/polars/data_types.rb', line 422 def initialize(name, dtype) @name = name @dtype = Utils.rb_type_to_dtype(dtype) end |
Instance Attribute Details
#dtype ⇒ Object (readonly)
Returns the value of attribute dtype.
420 421 422 |
# File 'lib/polars/data_types.rb', line 420 def dtype @dtype end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
420 421 422 |
# File 'lib/polars/data_types.rb', line 420 def name @name end |