This class provides access to the latest news / release notes, for a project. These notes are either extracted from a NEWS file or from the lastest entry in the HISTORY file.
Search glob if any files exist in project from which the Release class can gather information.
# File lib/pom/news.rb, line 19 def self.file_pattern FILE_PATTERN end
# File lib/pom/news.rb, line 24 def self.find(root) root = Pathname.new(root) root.glob(file_pattern, :casefold).first end
New News ;)
# File lib/pom/news.rb, line 36 def initialize(root, opts={}) @root = Pathname.new(root) @history = opts[:history] @file = opts[:file] || self.class.find(root) if @file super(File.read(@file)) end #if opts[:history] # @history = opts[:history] #elsif History.find(root) # @history = History.new(root) #end if !file && history @header = history.release.header @notes = history.release.notes @change = history.release.changes @version = history.release.version @date = history.release.date @nickname = history.release.nickname end end
Generated with the Darkfish Rdoc Generator 2.