Class: CommaSplice::Line
- Inherits:
-
Object
- Object
- CommaSplice::Line
- Defined in:
- lib/comma_splice/helpers/line.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#separator ⇒ Object
readonly
Returns the value of attribute separator.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(line, separator) ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(line, separator) ⇒ Line
Returns a new instance of Line.
5 6 7 8 9 |
# File 'lib/comma_splice/helpers/line.rb', line 5 def initialize(line, separator) @line = line @separator = separator @values = parse_csv_content(line).first end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
3 4 5 |
# File 'lib/comma_splice/helpers/line.rb', line 3 def line @line end |
#separator ⇒ Object (readonly)
Returns the value of attribute separator.
3 4 5 |
# File 'lib/comma_splice/helpers/line.rb', line 3 def separator @separator end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
3 4 5 |
# File 'lib/comma_splice/helpers/line.rb', line 3 def values @values end |