Class: SwitchFile::App
- Inherits:
-
Thor
- Object
- Thor
- SwitchFile::App
- Defined in:
- lib/switch_file/app.rb
Instance Method Summary collapse
Instance Method Details
#execute(source_path) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/switch_file/app.rb', line 15 def execute(source_path) SwitchFile.config_path = ['config'] sp = SourcePath.new(value: source_path) shortcut = FileTypeShortcut.new(value: ['shortcut'] || ask(sp.)) target_command = shortcut.file_type.generate_open_command(sp) `#{target_command}` end |