Class: Plasper::Options
- Inherits:
-
Object
- Object
- Plasper::Options
- Defined in:
- lib/Plasper/options.rb
Constant Summary collapse
- DEFAULT_ACTION =
'dump'- VALID_ACTIONS =
[DEFAULT_ACTION, 'talk', 'chat']
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#output_file ⇒ Object
readonly
Returns the value of attribute output_file.
-
#text_file ⇒ Object
readonly
Returns the value of attribute text_file.
-
#weights_file ⇒ Object
readonly
Returns the value of attribute weights_file.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Options
constructor
Initialize with CLI arguments.
Constructor Details
#initialize(argv) ⇒ Options
Initialize with CLI arguments
13 14 15 16 17 |
# File 'lib/Plasper/options.rb', line 13 def initialize(argv) parse argv @action = argv.last @action = DEFAULT_ACTION unless VALID_ACTIONS.include? @action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
5 6 7 |
# File 'lib/Plasper/options.rb', line 5 def action @action end |
#output_file ⇒ Object (readonly)
Returns the value of attribute output_file.
5 6 7 |
# File 'lib/Plasper/options.rb', line 5 def output_file @output_file end |
#text_file ⇒ Object (readonly)
Returns the value of attribute text_file.
5 6 7 |
# File 'lib/Plasper/options.rb', line 5 def text_file @text_file end |
#weights_file ⇒ Object (readonly)
Returns the value of attribute weights_file.
5 6 7 |
# File 'lib/Plasper/options.rb', line 5 def weights_file @weights_file end |