Class: PGit::StoryBranch::NameParser

Inherits:
Object
  • Object
show all
Defined in:
lib/pgit/story_branch/name_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(story) ⇒ NameParser

Returns a new instance of NameParser.



11
12
13
14
# File 'lib/pgit/story_branch/name_parser.rb', line 11

def initialize(story)
  @story = story
  @story_name = story.name
end

Instance Method Details

#nameObject



20
21
22
23
24
25
# File 'lib/pgit/story_branch/name_parser.rb', line 20

def name
  remove_fluff_words
  remove_non_alphanumeric_characters
  downcase
  add_story_id
end

#story_idObject



16
17
18
# File 'lib/pgit/story_branch/name_parser.rb', line 16

def story_id
  @story.id
end