Class: Jira::Auto::Tool::Performer::PrefixSprintUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/jira/auto/tool/performer/prefix_sprint_updater.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool) ⇒ PrefixSprintUpdater

Returns a new instance of PrefixSprintUpdater.



12
13
14
# File 'lib/jira/auto/tool/performer/prefix_sprint_updater.rb', line 12

def initialize(tool)
  @tool = tool
end

Instance Attribute Details

#toolObject (readonly)

Returns the value of attribute tool.



10
11
12
# File 'lib/jira/auto/tool/performer/prefix_sprint_updater.rb', line 10

def tool
  @tool
end

Instance Method Details

#act_on_sprints_for_sprint_prefix(sprint_prefix) ⇒ Object

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/jira/auto/tool/performer/prefix_sprint_updater.rb', line 27

def act_on_sprints_for_sprint_prefix(sprint_prefix)
  raise NotImplementedError
end

#first_sprint_to_act_on?(sprint_name) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
34
35
36
37
# File 'lib/jira/auto/tool/performer/prefix_sprint_updater.rb', line 31

def first_sprint_to_act_on?(sprint_name)
  if @first_sprint_already_identified
    false
  else
    @first_sprint_already_identified = (sprint_name =~ from_string_regex)
  end
end

#runObject



20
21
22
23
24
25
# File 'lib/jira/auto/tool/performer/prefix_sprint_updater.rb', line 20

def run
  sprint_prefixes.each do |sprint_prefix|
    @first_sprint_already_identified = false
    act_on_sprints_for_sprint_prefix(sprint_prefix)
  end
end

#sprint_prefixesObject



16
17
18
# File 'lib/jira/auto/tool/performer/prefix_sprint_updater.rb', line 16

def sprint_prefixes
  tool.unclosed_sprint_prefixes
end