Class: Refs::SymRef
- Inherits:
-
Struct
- Object
- Struct
- Refs::SymRef
- Defined in:
- lib/refs.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#refs ⇒ Object
Returns the value of attribute refs.
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
11 12 13 |
# File 'lib/refs.rb', line 11 def path @path end |
#refs ⇒ Object
Returns the value of attribute refs
11 12 13 |
# File 'lib/refs.rb', line 11 def refs @refs end |
Instance Method Details
#branch? ⇒ Boolean
20 21 22 |
# File 'lib/refs.rb', line 20 def branch? path.start_with?("refs/heads/") end |
#read_oid ⇒ Object
12 13 14 |
# File 'lib/refs.rb', line 12 def read_oid refs.read_ref(path) end |
#remote? ⇒ Boolean
24 25 26 |
# File 'lib/refs.rb', line 24 def remote? path.start_with?("refs/remotes/") end |
#short_name ⇒ Object
28 29 30 |
# File 'lib/refs.rb', line 28 def short_name refs.short_name(path) end |