Class: Rosette::Core::Head
- Inherits:
-
Ref
- Object
- Ref
- Rosette::Core::Head
show all
- Defined in:
- lib/rosette/core/git/ref.rb
Constant Summary
Constants inherited
from Ref
Ref::DELIMITER
Instance Attribute Summary
Attributes inherited from Ref
#name
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Ref
#head?, inherited, parse, #remote?, #tag?
Constructor Details
#initialize(name) ⇒ Head
Returns a new instance of Head.
82
83
84
|
# File 'lib/rosette/core/git/ref.rb', line 82
def initialize(name)
@name = name
end
|
Class Method Details
.create_from(chunks) ⇒ Object
76
77
78
79
80
|
# File 'lib/rosette/core/git/ref.rb', line 76
def self.create_from(chunks)
if chunks.first == 'heads'
new(chunks[1..-1].join(DELIMITER))
end
end
|
Instance Method Details
#to_s ⇒ Object
90
91
92
|
# File 'lib/rosette/core/git/ref.rb', line 90
def to_s
"refs/heads/#{name}"
end
|
#type ⇒ Object
86
87
88
|
# File 'lib/rosette/core/git/ref.rb', line 86
def type
:head
end
|