Class: Git::Tag

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

Overview

Represents a Git tag and its annotation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tag) ⇒ Tag

Gets change information for a specific tagged version.

Parameters:

  • tag (String)

    Tag for which to instantiate the class.



30
31
32
33
# File 'lib/tag_changelog/git/tag.rb', line 30

def initialize(tag)
  @version = tag
  @date = Date.parse(Git.get_tag_date(tag))
end

Instance Attribute Details

#dateObject (readonly)

Author commit date of the tag



21
22
23
# File 'lib/tag_changelog/git/tag.rb', line 21

def date
  @date
end

#versionObject (readonly)

Tag version



24
25
26
# File 'lib/tag_changelog/git/tag.rb', line 24

def version
  @version
end