Class: CommaSplice::Line

Inherits:
Object
  • Object
show all
Defined in:
lib/comma_splice/helpers/line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lineObject (readonly)

Returns the value of attribute line.



3
4
5
# File 'lib/comma_splice/helpers/line.rb', line 3

def line
  @line
end

#separatorObject (readonly)

Returns the value of attribute separator.



3
4
5
# File 'lib/comma_splice/helpers/line.rb', line 3

def separator
  @separator
end

#valuesObject (readonly)

Returns the value of attribute values.



3
4
5
# File 'lib/comma_splice/helpers/line.rb', line 3

def values
  @values
end