Class: DuoSplitter::Commands::BaseCommand
- Inherits:
-
Object
- Object
- DuoSplitter::Commands::BaseCommand
- Defined in:
- lib/duo_splitter/commands/base_command.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
-
#initialize(argv) ⇒ BaseCommand
constructor
A new instance of BaseCommand.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ BaseCommand
Returns a new instance of BaseCommand.
11 12 13 14 15 16 17 18 |
# File 'lib/duo_splitter/commands/base_command.rb', line 11 def initialize(argv) @parser = OptionParser.new @context = Context.new @context.output_dir = default_output_dir if default_output_dir (argv) handle_audio_paths(argv) end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
9 10 11 |
# File 'lib/duo_splitter/commands/base_command.rb', line 9 def context @context end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
9 10 11 |
# File 'lib/duo_splitter/commands/base_command.rb', line 9 def parser @parser end |
Instance Method Details
#run ⇒ Object
20 21 22 |
# File 'lib/duo_splitter/commands/base_command.rb', line 20 def run raise Error, '#run must be defined in sub classes' end |