Class: CSV::FieldInfo
- Inherits:
-
Struct
- Object
- Struct
- CSV::FieldInfo
- Defined in:
- lib/csv.rb
Overview
A FieldInfo Struct contains details about a field’s position in the data source it was read from. CSV will pass this Struct to some blocks that make decisions based on field structure. See CSV.convert_fields() for an example.
index
-
The zero-based index of the field in its row.
line
-
The line of the data source this row is from.
header
-
The header for the column, when available.
quoted?
-
True or false, whether the original value is quoted or not.
Instance Attribute Summary collapse
-
#header ⇒ Object
Returns the value of attribute header.
-
#index ⇒ Object
Returns the value of attribute index.
-
#line ⇒ Object
Returns the value of attribute line.
-
#quoted? ⇒ Object
Returns the value of attribute quoted?.
Instance Attribute Details
#header ⇒ Object
Returns the value of attribute header
881 882 883 |
# File 'lib/csv.rb', line 881 def header @header end |
#index ⇒ Object
Returns the value of attribute index
881 882 883 |
# File 'lib/csv.rb', line 881 def index @index end |
#line ⇒ Object
Returns the value of attribute line
881 882 883 |
# File 'lib/csv.rb', line 881 def line @line end |
#quoted? ⇒ Object
Returns the value of attribute quoted?
881 882 883 |
# File 'lib/csv.rb', line 881
def quoted?
@quoted?
end
|