Class: Mj::Git::LocalBranch
- Inherits:
-
Object
- Object
- Mj::Git::LocalBranch
- Defined in:
- lib/mj/git/local_branch.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #checkout_command ⇒ Object
-
#initialize(name) ⇒ LocalBranch
constructor
A new instance of LocalBranch.
- #length ⇒ Object
- #to_local ⇒ Object
Constructor Details
#initialize(name) ⇒ LocalBranch
Returns a new instance of LocalBranch.
8 9 10 |
# File 'lib/mj/git/local_branch.rb', line 8 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/mj/git/local_branch.rb', line 6 def name @name end |
Instance Method Details
#checkout_command ⇒ Object
16 17 18 |
# File 'lib/mj/git/local_branch.rb', line 16 def checkout_command "git checkout #{name}" end |
#length ⇒ Object
12 13 14 |
# File 'lib/mj/git/local_branch.rb', line 12 def length @name.length end |
#to_local ⇒ Object
20 21 22 |
# File 'lib/mj/git/local_branch.rb', line 20 def to_local self end |