Class: Jura::Command::Sprint::Active

Inherits:
Base
  • Object
show all
Defined in:
lib/jura/command/sprint/active.rb

Class Method Summary collapse

Methods inherited from Base

board_id

Class Method Details

.execute!(opts = nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/jura/command/sprint/active.rb', line 7

def self.execute!(opts = nil)
  sprints = Component::Spinner.render do
    Api::Sprint.all(board_id)
  end

  configuration = Component::Spinner.render do
    Api::Board.configuration(board_id)
  end

  active_sprint = sprints.detect { |sprint| sprint['state'] == 'active' }
  puts Component::Sprint::Active.render(board_id, active_sprint, configuration)
end