Class: PGit::StoryBranch

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

Defined Under Namespace

Classes: Application, NameParser

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name_parser) ⇒ StoryBranch

Returns a new instance of StoryBranch.



14
15
16
# File 'lib/pgit/story_branch.rb', line 14

def initialize(name_parser)
  @name_parser = name_parser
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

Instance Method Details

#nameObject



22
23
24
# File 'lib/pgit/story_branch.rb', line 22

def name
  @name_parser.name
end

#startObject



18
19
20
# File 'lib/pgit/story_branch.rb', line 18

def start
  `git checkout -b #{name}`
end