class VCLog::HistoryFile
The HistoryFile
class will parse a history into an array of release tags. Of course to do this, it assumes a specific file format.
Constants
- CASEFOLD
Alias for ‘File::FNM_CASEFOLD`.
- DATE
- FILE
- LINE
- VERS
Attributes
Public Class Methods
new(source=nil)
click to toggle source
Setup new HistoryFile
instance.
# File lib/vclog/history_file.rb, line 22 def initialize(source=nil) if File.file?(source) @file = source @root = File.dirname(source) elsif File.directory?(source) @file = Dir.glob(File.join(source,FILE), CASEFOLD).first @root = source else @file = Dir.glob(FILE).first @root = Dir.pwd end raise "no history file" unless @file @tags = extract_tags end
Public Instance Methods
news()
click to toggle source
# File lib/vclog/history_file.rb, line 63 def news tags.first.message end