Class: RDoc::Parser::ChangeLog::Git::LogEntry
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
          Struct
         | |
| Instance Chain: 
          self,
          Struct
         | |
| Inherits: | Struct 
 | 
| Defined in: | lib/rdoc/parser/changelog.rb | 
Constant Summary
- 
    HEADING_LEVEL =
    
 # File 'lib/rdoc/parser/changelog.rb', line 2723
Class Method Summary
Instance Attribute Summary
Instance Method Summary
- #accept(visitor)
- #aref
- #label(context = nil)
- #level
- #text
- #pretty_print(q) Internal use only
Constructor Details
    .new(base, commit, author, email, date, contents)  ⇒ LogEntry 
  
# File 'lib/rdoc/parser/changelog.rb', line 274
def initialize(base, commit, , email, date, contents) case contents when String contents = RDoc::Markdown.parse(contents).parts.each do |body| case body when RDoc::Markup::Heading body.level += HEADING_LEVEL + 1 end end case first = contents[0] when RDoc::Markup::Paragraph contents[0] = RDoc::Markup::Heading.new(HEADING_LEVEL + 1, first.text) end end super end
Instance Attribute Details
#author (rw)
[ GitHub ]#base (rw)
[ GitHub ]#commit (rw)
[ GitHub ]#contents (rw)
[ GitHub ]#date (rw)
[ GitHub ]#email (rw)
[ GitHub ]Instance Method Details
#accept(visitor)
[ GitHub ]# File 'lib/rdoc/parser/changelog.rb', line 314
def accept(visitor) visitor.accept_heading self begin if visitor.respond_to?(:code_object=) code_object = visitor.code_object visitor.code_object = self end contents.each do |body| body.accept visitor end ensure if visitor.respond_to?(:code_object) visitor.code_object = code_object end end end
#aref
[ GitHub ]# File 'lib/rdoc/parser/changelog.rb', line 295
def aref "label-#{commit}" end
#label(context = nil)
[ GitHub ]# File 'lib/rdoc/parser/changelog.rb', line 299
def label(context = nil) aref end
#level
[ GitHub ]# File 'lib/rdoc/parser/changelog.rb', line 291
def level HEADING_LEVEL end
#pretty_print(q)
    This method is for internal use only.
  
  [ GitHub ]
# File 'lib/rdoc/parser/changelog.rb', line 331
def pretty_print(q) # :nodoc: q.group(2, '[log_entry: ', ']') do q.text commit q.text ',' q.breakable q.group(2, '[date: ', ']') { q.text date } q.text ',' q.breakable q.group(2, '[author: ', ']') { q.text } q.text ',' q.breakable q.group(2, '[email: ', ']') { q.text email } q.text ',' q.breakable q.pp contents end end