Class: R10K::Git::Tag Private

Inherits:
Ref
  • Object
show all
Defined in:
lib/r10k/git/tag.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

tag: A ref under refs/tags/ namespace that points to an object of an arbitrary type (typically a tag points to either a tag or a commit object). In contrast to a head, a tag is not updated by the commit command. A tag is most typically used to mark a particular point in the commit ancestry chain.

Instance Attribute Summary collapse

Attributes inherited from Ref

#repository

Instance Method Summary collapse

Methods inherited from Ref

#==, #inspect, #resolvable?, #sha1, #to_s

Constructor Details

#initialize(tag, repository = nil) ⇒ Tag

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Tag.



18
19
20
21
# File 'lib/r10k/git/tag.rb', line 18

def initialize(tag, repository = nil)
  @tag = tag
  @repository = repository
end

Instance Attribute Details

#tagObject (readonly) Also known as: ref

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
# File 'lib/r10k/git/tag.rb', line 15

def tag
  @tag
end

Instance Method Details

#fetch?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


23
24
25
# File 'lib/r10k/git/tag.rb', line 23

def fetch?
  ! resolvable?
end