Class: SeparatedValues::RowParser

Inherits:
Object
  • Object
show all
Defined in:
lib/separated_values/row_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_data, options = DEFAULT_OPTIONS) ⇒ RowParser

Returns a new instance of RowParser.



7
8
9
10
# File 'lib/separated_values/row_parser.rb', line 7

def initialize(source_data, options = DEFAULT_OPTIONS)
  @source_data = source_data
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/separated_values/row_parser.rb', line 5

def options
  @options
end

#source_dataObject (readonly)

Returns the value of attribute source_data.



5
6
7
# File 'lib/separated_values/row_parser.rb', line 5

def source_data
  @source_data
end

Instance Method Details

#parseObject



12
13
14
# File 'lib/separated_values/row_parser.rb', line 12

def parse
  Row.new(source_data_to_array)
end