Class: Filegen::Options
- Inherits:
-
Object
- Object
- Filegen::Options
- Defined in:
- lib/filegen/options.rb
Overview
Commandline parser
Instance Method Summary collapse
-
#data_sources ⇒ Array
The data sources which can be used.
-
#destination ⇒ IO
Destination for output.
-
#initialize(argv) ⇒ Options
constructor
Create commandline parser.
-
#source ⇒ File
Source template.
Constructor Details
#initialize(argv) ⇒ Options
Create commandline parser
15 16 17 18 19 |
# File 'lib/filegen/options.rb', line 15 def initialize(argv) @params = (argv) validate_params end |
Instance Method Details
#data_sources ⇒ Array
The data sources which can be used
41 42 43 |
# File 'lib/filegen/options.rb', line 41 def data_sources DataSourceBuilder.new(params).sources end |
#destination ⇒ IO
Destination for output
33 34 35 |
# File 'lib/filegen/options.rb', line 33 def destination $stdout end |
#source ⇒ File
Source template
25 26 27 |
# File 'lib/filegen/options.rb', line 25 def source File.new(params.template) end |