Class: Gitloggl::Commands::Sync
- Inherits:
-
Gitloggl::Command
- Object
- Gitloggl::Command
- Gitloggl::Commands::Sync
- Defined in:
- lib/gitloggl/commands/sync.rb
Instance Attribute Summary collapse
-
#date_from ⇒ Object
Returns the value of attribute date_from.
-
#date_to ⇒ Object
Returns the value of attribute date_to.
-
#gitlab_bar ⇒ Object
Returns the value of attribute gitlab_bar.
-
#integration ⇒ Object
Returns the value of attribute integration.
-
#toggl_bar ⇒ Object
Returns the value of attribute toggl_bar.
Attributes inherited from Gitloggl::Command
Instance Method Summary collapse
Methods inherited from Gitloggl::Command
#back?, #capture_back, #command, #config, #cursor, #editor, #exec_exist?, #generator, #initialize, #menu_back, #pager, #pastel, #platform, #prompt, #render_table, #screen, #verbose?, #which
Constructor Details
This class inherits a constructor from Gitloggl::Command
Instance Attribute Details
#date_from ⇒ Object
Returns the value of attribute date_from.
6 7 8 |
# File 'lib/gitloggl/commands/sync.rb', line 6 def date_from @date_from end |
#date_to ⇒ Object
Returns the value of attribute date_to.
6 7 8 |
# File 'lib/gitloggl/commands/sync.rb', line 6 def date_to @date_to end |
#gitlab_bar ⇒ Object
Returns the value of attribute gitlab_bar.
7 8 9 |
# File 'lib/gitloggl/commands/sync.rb', line 7 def @gitlab_bar end |
#integration ⇒ Object
Returns the value of attribute integration.
6 7 8 |
# File 'lib/gitloggl/commands/sync.rb', line 6 def integration @integration end |
#toggl_bar ⇒ Object
Returns the value of attribute toggl_bar.
7 8 9 |
# File 'lib/gitloggl/commands/sync.rb', line 7 def @toggl_bar end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/gitloggl/commands/sync.rb', line 9 def execute if integrations.empty? puts pastel.yellow('Please add integration first') return back.call end self.integration = select_integration self.date_from, self.date_to = select_dates setup_toggl_hooks setup_gitlab_hooks toggl.run print_tables end |