Class: Cyrel::AST::LoadCsvNode
- Inherits:
-
ClauseNode
- Object
- Node
- ClauseNode
- Cyrel::AST::LoadCsvNode
- Defined in:
- lib/cyrel/ast/load_csv_node.rb
Overview
AST node for LOAD CSV clause (extension) For when you need to import data from the ancient format of CSV
Instance Attribute Summary collapse
-
#fieldterminator ⇒ Object
readonly
Returns the value of attribute fieldterminator.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#variable ⇒ Object
readonly
Returns the value of attribute variable.
-
#with_headers ⇒ Object
readonly
Returns the value of attribute with_headers.
Instance Method Summary collapse
-
#initialize(url, variable, with_headers: false, fieldterminator: nil) ⇒ LoadCsvNode
constructor
A new instance of LoadCsvNode.
Methods inherited from Node
Constructor Details
#initialize(url, variable, with_headers: false, fieldterminator: nil) ⇒ LoadCsvNode
Returns a new instance of LoadCsvNode.
10 11 12 13 14 15 |
# File 'lib/cyrel/ast/load_csv_node.rb', line 10 def initialize(url, variable, with_headers: false, fieldterminator: nil) @url = url @variable = variable @with_headers = with_headers @fieldterminator = fieldterminator end |
Instance Attribute Details
#fieldterminator ⇒ Object (readonly)
Returns the value of attribute fieldterminator.
8 9 10 |
# File 'lib/cyrel/ast/load_csv_node.rb', line 8 def fieldterminator @fieldterminator end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/cyrel/ast/load_csv_node.rb', line 8 def url @url end |
#variable ⇒ Object (readonly)
Returns the value of attribute variable.
8 9 10 |
# File 'lib/cyrel/ast/load_csv_node.rb', line 8 def variable @variable end |
#with_headers ⇒ Object (readonly)
Returns the value of attribute with_headers.
8 9 10 |
# File 'lib/cyrel/ast/load_csv_node.rb', line 8 def with_headers @with_headers end |