Class: Jira::Auto::Tool::Performer::SprintRenamer::NextNameGenerator
- Defined in:
- lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb
Instance Attribute Summary collapse
-
#name_of_first_renamed_sprint ⇒ Object
readonly
Returns the value of attribute name_of_first_renamed_sprint.
-
#original_name_of_first_renamed_sprint ⇒ Object
readonly
Returns the value of attribute original_name_of_first_renamed_sprint.
Instance Method Summary collapse
-
#initialize(original_name_of_first_renamed_sprint, name_of_first_renamed_sprint) ⇒ NextNameGenerator
constructor
A new instance of NextNameGenerator.
- #name_for(_sprint_name) ⇒ Object
- #new_name_of_sprint_next_to_first_renamed_sprint ⇒ Object
- #next_name_in_planning_interval ⇒ Object
- #pulling_sprint_into_previous_planning_interval? ⇒ Boolean
Constructor Details
#initialize(original_name_of_first_renamed_sprint, name_of_first_renamed_sprint) ⇒ NextNameGenerator
Returns a new instance of NextNameGenerator.
13 14 15 16 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 13 def initialize(original_name_of_first_renamed_sprint, name_of_first_renamed_sprint) @original_name_of_first_renamed_sprint = Sprint::Name.parse(original_name_of_first_renamed_sprint) @name_of_first_renamed_sprint = Sprint::Name.parse(name_of_first_renamed_sprint) end |
Instance Attribute Details
#name_of_first_renamed_sprint ⇒ Object (readonly)
Returns the value of attribute name_of_first_renamed_sprint.
11 12 13 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 11 def name_of_first_renamed_sprint @name_of_first_renamed_sprint end |
#original_name_of_first_renamed_sprint ⇒ Object (readonly)
Returns the value of attribute original_name_of_first_renamed_sprint.
11 12 13 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 11 def original_name_of_first_renamed_sprint @original_name_of_first_renamed_sprint end |
Instance Method Details
#name_for(_sprint_name) ⇒ Object
18 19 20 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 18 def name_for(_sprint_name) next_name_in_planning_interval end |
#new_name_of_sprint_next_to_first_renamed_sprint ⇒ Object
22 23 24 25 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 22 def new_name_of_sprint_next_to_first_renamed_sprint @new_name_of_sprint_next_to_first_renamed_sprint ||= name_of_first_renamed_sprint.next_in_planning_interval end |
#next_name_in_planning_interval ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 27 def next_name_in_planning_interval @next_name_in_planning_interval ||= new_name_of_sprint_next_to_first_renamed_sprint next_name = @next_name_in_planning_interval.to_s @next_name_in_planning_interval = @next_name_in_planning_interval.next_in_planning_interval next_name end |
#pulling_sprint_into_previous_planning_interval? ⇒ Boolean
37 38 39 40 41 |
# File 'lib/jira/auto/tool/performer/sprint_renamer/next_name_generator.rb', line 37 def pulling_sprint_into_previous_planning_interval? (name_of_first_renamed_sprint.planning_interval <=> original_name_of_first_renamed_sprint.planning_interval) .negative? end |