Class: V::Adapters::Git::Tag
- Inherits:
-
ObjectType
- Object
- ObjectType
- V::Adapters::Git::Tag
- Defined in:
- lib/v/adapters/git/object_types/tag.rb
Instance Method Summary collapse
-
#commit(object) ⇒ Object
Returns the commit the object points to.
-
#content(obj) ⇒ Object
Returns the name of the commit the object points to.
Methods inherited from ObjectType
Instance Method Details
#commit(object) ⇒ Object
Returns the commit the object points to.
13 14 15 |
# File 'lib/v/adapters/git/object_types/tag.rb', line 13 def commit(object) Commit.with object.environment, :name => object.content end |
#content(obj) ⇒ Object
Returns the name of the commit the object points to.
7 8 9 10 |
# File 'lib/v/adapters/git/object_types/tag.rb', line 7 def content(obj) path = File.join obj.environment.git_dir, %w[ refs tags ], obj.name File.read(path).chomp end |