Class: Rosette::Core::Remote
Constant Summary
Constants inherited from Ref
Instance Attribute Summary collapse
-
#remote ⇒ Object
readonly
Returns the value of attribute remote.
Attributes inherited from Ref
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(remote, name) ⇒ Remote
constructor
A new instance of Remote.
- #to_s ⇒ Object
- #type ⇒ Object
Methods inherited from Ref
#head?, inherited, parse, #remote?, #tag?
Constructor Details
#initialize(remote, name) ⇒ Remote
Returns a new instance of Remote.
61 62 63 64 |
# File 'lib/rosette/core/git/ref.rb', line 61 def initialize(remote, name) @remote = remote @name = name end |
Instance Attribute Details
#remote ⇒ Object (readonly)
Returns the value of attribute remote.
59 60 61 |
# File 'lib/rosette/core/git/ref.rb', line 59 def remote @remote end |
Class Method Details
.create_from(chunks) ⇒ Object
53 54 55 56 57 |
# File 'lib/rosette/core/git/ref.rb', line 53 def self.create_from(chunks) if chunks.first == 'remotes' new(chunks[1], chunks[2..-1].join(DELIMITER)) end end |
Instance Method Details
#to_s ⇒ Object
70 71 72 |
# File 'lib/rosette/core/git/ref.rb', line 70 def to_s "refs/remotes/#{remote}/#{name}" end |
#type ⇒ Object
66 67 68 |
# File 'lib/rosette/core/git/ref.rb', line 66 def type :remote end |