Class: Changelog::Release
Instance Method Summary collapse
- #commits ⇒ Object
- #date ⇒ Object
- #display ⇒ Object
-
#initialize(name, description, sha, date, status = nil, items = nil) ⇒ Release
constructor
A new instance of Release.
- #inspect ⇒ Object
- #items ⇒ Object
- #name ⇒ Object
- #released? ⇒ Boolean
- #status ⇒ Object
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
#commits ⇒ Object
68 69 |
# File 'lib/changelog.rb', line 68 def commits end |
#date ⇒ Object
85 86 87 |
# File 'lib/changelog.rb', line 85 def date return @date end |
#display ⇒ Object
97 98 99 |
# File 'lib/changelog.rb', line 97 def display end |
#inspect ⇒ Object
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 |
#items ⇒ Object
71 72 73 |
# File 'lib/changelog.rb', line 71 def items @items end |
#name ⇒ Object
81 82 83 |
# File 'lib/changelog.rb', line 81 def name return @name end |
#released? ⇒ Boolean
93 94 95 |
# File 'lib/changelog.rb', line 93 def released? return self.status == "RELEASED" end |
#status ⇒ Object
89 90 91 |
# File 'lib/changelog.rb', line 89 def status return @status end |