Class: Hglib::Repo::Tag

Inherits:
Object
  • Object
show all
Extended by:
Loggability
Defined in:
lib/hglib/repo/tag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo, tag:, node:, rev: 0, type: '') ⇒ Tag

Create a tag object.



18
19
20
21
22
23
24
# File 'lib/hglib/repo/tag.rb', line 18

def initialize( repo, tag:, node:, rev: 0, type: '' )
	@repo = repo
	@name = tag
	@node = node
	@rev  = rev
	@type = type
end

Instance Attribute Details

#nameObject (readonly)

The tag’s name



37
38
39
# File 'lib/hglib/repo/tag.rb', line 37

def name
  @name
end

#nodeObject (readonly)

The SHA of the node the tag points to



41
42
43
# File 'lib/hglib/repo/tag.rb', line 41

def node
  @node
end

#repoObject (readonly)

The repo the tag belongs to



33
34
35
# File 'lib/hglib/repo/tag.rb', line 33

def repo
  @repo
end

#revObject (readonly)

The numeric revision the tag points to



45
46
47
# File 'lib/hglib/repo/tag.rb', line 45

def rev
  @rev
end

#typeObject (readonly)

The tag type



49
50
51
# File 'lib/hglib/repo/tag.rb', line 49

def type
  @type
end