Class: TogglCmd::Runner
- Inherits:
-
Object
- Object
- TogglCmd::Runner
- Defined in:
- lib/toggl_cmd/runner.rb
Class Method Summary collapse
Class Method Details
.toggl(args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/toggl_cmd/runner.rb', line 12 def self.toggl(args) token = IO.readlines(File.("~/.toggl")).join.strip = RunnerOptions.new(args) if [:tasks] prettify_tasks(Toggl.new(token, NAME).tasks) elsif [:projects] prettify_projects(Toggl.new(token, NAME).projects) elsif .any? prettify_tasks(Toggl.new(token, NAME, .delete(:debug)).create_task()) else puts .opts end end |