Class: ListTool::App::Runner
- Inherits:
-
Object
- Object
- ListTool::App::Runner
- Defined in:
- lib/list_tool/app/runner.rb
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #run(argv) ⇒ Object
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
6 7 8 9 10 11 |
# File 'lib/list_tool/app/runner.rb', line 6 def initialize @datadir = File.join(Dir.home, '.clt/') @datafile = 'data.json' @lister = Lister.new end |
Instance Method Details
#run(argv) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/list_tool/app/runner.rb', line 13 def run argv ensure_data load_data Commands.process argv, @lister @lister.save datafile_fullname rescue => e Printer.error(e) end |