class Tag

Represents a Git tag and its annotation.

Attributes

changelog[R]

Array of lines in the tag annotation that are changelog entries.

date[R]

Author commit date of the tag

heading[RW]

The heading of the tag annotation.

text[R]

Array of lines in the tag annotation that are not changelog entries.

Public Class Methods

new(tag) click to toggle source

Gets change information for a specific tagged version.

@param [String] tag

Tag for which to instantiate the class.
# File lib/tag.rb, line 36
def initialize(tag)
        annotation = Git.get_tag_annotation(tag)
        @date = Date.parse(Git.get_tag_date(tag))
        if annotation
                annotation = annotation.split("\n")
                @heading = annotation.shift
                @heading = @heading.split(' ')[1..-1].join(' ') if @heading
                filter = ChangelogFilter.FromArray(annotation)
                @text = filter.other_text.remove_indent if filter.other_text
                @changelog = filter.changelog
        end
end