Class: ScrumNinja::Story
- Inherits:
-
Struct
- Object
- Struct
- ScrumNinja::Story
- Defined in:
- lib/scrum_ninja/story.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner_id ⇒ Object
Returns the value of attribute owner_id.
-
#story_number ⇒ Object
Returns the value of attribute story_number.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/scrum_ninja/story.rb', line 2 def name @name end |
#owner_id ⇒ Object
Returns the value of attribute owner_id
2 3 4 |
# File 'lib/scrum_ninja/story.rb', line 2 def owner_id @owner_id end |
#story_number ⇒ Object
Returns the value of attribute story_number
2 3 4 |
# File 'lib/scrum_ninja/story.rb', line 2 def story_number @story_number end |
#type ⇒ Object
Returns the value of attribute type
2 3 4 |
# File 'lib/scrum_ninja/story.rb', line 2 def type @type end |
Instance Method Details
#branch_name ⇒ Object
15 16 17 |
# File 'lib/scrum_ninja/story.rb', line 15 def branch_name [story_number, hyphenized_name] * '-' end |
#has_owner? ⇒ Boolean
11 12 13 |
# File 'lib/scrum_ninja/story.rb', line 11 def has_owner? @owner_id end |
#hyphenized_name ⇒ Object
19 20 21 22 23 |
# File 'lib/scrum_ninja/story.rb', line 19 def hyphenized_name GitWrapper.string_hyphenize(name) rescue "indeterminate-branch-name-#{rand(100000000000)}" end |
#to_i ⇒ Object
7 8 9 |
# File 'lib/scrum_ninja/story.rb', line 7 def to_i story_number.to_i end |
#to_s ⇒ Object
3 4 5 |
# File 'lib/scrum_ninja/story.rb', line 3 def to_s '%-5s %6d: %s' % [type, story_number, name] end |