Class: Changelog::Release

Inherits:
Base
  • Object
show all
Defined in:
lib/changelog.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, description, sha, date, status = nil, items = nil) ⇒ Release

Returns a new instance of Release.



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/changelog.rb', line 56

def initialize(name, description, sha, date, status=nil, items=nil)
  super()
  status ||= "NA"
  @name = name.delete("\n")

  @description = description
  @sha = sha
  @date = date
  @status = status
  @items = items
end

Instance Method Details

#commitsObject



68
69
# File 'lib/changelog.rb', line 68

def commits
end

#dateObject



85
86
87
# File 'lib/changelog.rb', line 85

def date
  return @date
end

#displayObject



97
98
99
# File 'lib/changelog.rb', line 97

def display

end

#inspectObject



75
76
77
78
79
# File 'lib/changelog.rb', line 75

def inspect
  str = "<#{@name} at #{@date.strftime("%x")} (#{@items.length} items)>"
  @items.each { |i| str.concat("<#{i.inspect}>") }
  return str
end

#itemsObject



71
72
73
# File 'lib/changelog.rb', line 71

def items
  @items
end

#nameObject



81
82
83
# File 'lib/changelog.rb', line 81

def name
  return @name
end

#released?Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/changelog.rb', line 93

def released?
  return self.status == "RELEASED"
end

#statusObject



89
90
91
# File 'lib/changelog.rb', line 89

def status
  return @status
end