Class: GhettoNotes::Main
- Inherits:
-
Object
- Object
- GhettoNotes::Main
- Defined in:
- lib/ghetto_notes/main.rb
Instance Method Summary collapse
-
#initialize(subcommand, sync_dir) ⇒ Main
constructor
A new instance of Main.
- #run ⇒ Object
Constructor Details
#initialize(subcommand, sync_dir) ⇒ Main
5 6 7 8 9 |
# File 'lib/ghetto_notes/main.rb', line 5 def initialize(subcommand, sync_dir) @subcommand = subcommand @sync_dir = File.(sync_dir) GhettoNotes.exit_with_usage unless ['install', 'sync'].include?(subcommand) end |
Instance Method Details
#run ⇒ Object
11 12 13 |
# File 'lib/ghetto_notes/main.rb', line 11 def run send("#{subcommand}_subcommand") end |