Class: Csvtool::Domain::RowRandomizationSession::RandomizationSource
- Inherits:
-
Object
- Object
- Csvtool::Domain::RowRandomizationSession::RandomizationSource
- Defined in:
- lib/csvtool/domain/row_randomization_session/randomization_source.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#separator ⇒ Object
readonly
Returns the value of attribute separator.
Instance Method Summary collapse
- #headers_present? ⇒ Boolean
-
#initialize(path:, separator:, headers_present:) ⇒ RandomizationSource
constructor
A new instance of RandomizationSource.
Constructor Details
#initialize(path:, separator:, headers_present:) ⇒ RandomizationSource
Returns a new instance of RandomizationSource.
9 10 11 12 13 14 15 16 |
# File 'lib/csvtool/domain/row_randomization_session/randomization_source.rb', line 9 def initialize(path:, separator:, headers_present:) 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 @headers_present = headers_present end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/csvtool/domain/row_randomization_session/randomization_source.rb', line 7 def path @path end |
#separator ⇒ Object (readonly)
Returns the value of attribute separator.
7 8 9 |
# File 'lib/csvtool/domain/row_randomization_session/randomization_source.rb', line 7 def separator @separator end |
Instance Method Details
#headers_present? ⇒ Boolean
18 19 20 |
# File 'lib/csvtool/domain/row_randomization_session/randomization_source.rb', line 18 def headers_present? @headers_present end |