Class: AsciiDataTools::InputSourceFactory
- Inherits:
-
Object
- Object
- AsciiDataTools::InputSourceFactory
- Defined in:
- lib/ascii-data-tools/configuration.rb
Instance Method Summary collapse
-
#initialize(properties = {}) ⇒ InputSourceFactory
constructor
A new instance of InputSourceFactory.
- #input_sources_from(input_arguments) ⇒ Object
Constructor Details
#initialize(properties = {}) ⇒ InputSourceFactory
Returns a new instance of InputSourceFactory.
81 82 83 84 |
# File 'lib/ascii-data-tools/configuration.rb', line 81 def initialize(properties = {}) @expected_argument_number = properties[:expected_argument_number] || 1 @input_pipe_accepted = properties[:input_pipe_accepted].nil? ? true : properties[:input_pipe_accepted] end |
Instance Method Details
#input_sources_from(input_arguments) ⇒ Object
86 87 88 89 |
# File 'lib/ascii-data-tools/configuration.rb', line 86 def input_sources_from(input_arguments) validate_number_of input_arguments return input_arguments.collect {|arg| make_input_source_from(arg)} end |