Class: Jira::Command::Sprint
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
Instance Method Summary collapse
-
#initialize(active) ⇒ Sprint
constructor
A new instance of Sprint.
- #run ⇒ Object
Constructor Details
#initialize(active) ⇒ Sprint
Returns a new instance of Sprint.
16 17 18 |
# File 'lib/jira/commands/sprint.rb', line 16 def initialize(active) self.active = active end |
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
14 15 16 |
# File 'lib/jira/commands/sprint.rb', line 14 def active @active end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/jira/commands/sprint.rb', line 21 def run return if rapid_view.empty? return if no_sprints? return if sprint.empty? if active == active sprint_id = info['sprint']['id'] jql = "sprint = #{sprint_id}" Command::Tickets.new(jql).run else render_table( [ 'Sprint', 'State' ], [ [ info['sprint']['name'], info['sprint']['state'] ] ] ) end end |