Class: PTLog::Wrappers::ChangeLog
- Inherits:
-
Object
- Object
- PTLog::Wrappers::ChangeLog
- Defined in:
- lib/ptlog/wrappers/changelog.rb
Instance Attribute Summary collapse
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
- #date ⇒ Object
-
#initialize ⇒ ChangeLog
constructor
A new instance of ChangeLog.
- #releases ⇒ Object
Constructor Details
#initialize ⇒ ChangeLog
Returns a new instance of ChangeLog.
5 6 7 8 9 |
# File 'lib/ptlog/wrappers/changelog.rb', line 5 def initialize @git ||= ::Git.open(Dir.getwd) @start = ENV['PTLOG_SINCE'] || git.lib..first = PTLog::TagList.new(@git, @start) end |
Instance Attribute Details
#git ⇒ Object (readonly)
Returns the value of attribute git.
3 4 5 |
# File 'lib/ptlog/wrappers/changelog.rb', line 3 def git @git end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
3 4 5 |
# File 'lib/ptlog/wrappers/changelog.rb', line 3 def end |
Instance Method Details
#date ⇒ Object
11 12 13 |
# File 'lib/ptlog/wrappers/changelog.rb', line 11 def date Time.new.utc.strftime('%I:%M%P %D UTC') end |
#releases ⇒ Object
15 16 17 18 19 |
# File 'lib/ptlog/wrappers/changelog.rb', line 15 def releases .map do |tag| PTLog::Wrappers::Release.new(tag, self) end end |