Module: RDoc::Parser::ChangeLog::Git
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Defined in: | lib/rdoc/parser/changelog.rb |
Instance Method Summary
Instance Method Details
#create_entries(entries)
[ GitHub ]#parse_entries
[ GitHub ]# File 'lib/rdoc/parser/changelog.rb', line 225
def parse_entries entries = [] @content.scan(/^commit\s(\h{20})\h*\n((?:.\n)*)\n((?: {4}.*\n+)*)/) do entry_name, header, entry_body = $1, $2, $3.gsub(/^ {4}/, '') # header = header.scan(/^ *(\S+?): +(.*)/).to_h # date = header["CommitDate"] || header["Date"] date = header[/^ *(?:Author)?Date: +(.*)/, 1] = header[/^ *Author: +(.*)/, 1] begin time = parse_date(header[/^ *CommitDate: +(.*)/, 1] || date) @time_cache[entry_name] = time .sub!(/\s*<(.*)>/, '') email = $1 entries << [entry_name, [, email, date, entry_body]] rescue ArgumentError end end entries end
#parse_info(info)
[ GitHub ]# File 'lib/rdoc/parser/changelog.rb', line 220
def parse_info(info) /^\s*base-url\s*=\s*(.*\S)/ =~ info @base_url = $1 end