Class: Csvtool::Domain::RowSession::RowSource

Inherits:
Object
  • Object
show all
Defined in:
lib/csvtool/domain/row_session/row_source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, separator:) ⇒ RowSource

Returns a new instance of RowSource.

Raises:

  • (ArgumentError)


9
10
11
12
13
14
15
# File 'lib/csvtool/domain/row_session/row_source.rb', line 9

def initialize(path:, separator:)
  raise ArgumentError, "path cannot be empty" if path.to_s.empty?
  raise ArgumentError, "separator cannot be empty" if separator.to_s.empty?

  @path = path
  @separator = separator
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/csvtool/domain/row_session/row_source.rb', line 7

def path
  @path
end

#separatorObject (readonly)

Returns the value of attribute separator.



7
8
9
# File 'lib/csvtool/domain/row_session/row_source.rb', line 7

def separator
  @separator
end