In Files

  • rdoc/rd/inline.rb

Parent

Class/Module Index [+]

Quicksearch

RDoc::RD::Inline

Inline keeps track of markup and labels to create proper links.

Attributes

rdoc[R]

The markup of this reference in RDoc format

reference[R]

The text of the reference

to_s[R]

The markup of this reference in RDoc format

Public Class Methods

new(rdoc, reference = rdoc) click to toggle source

Creates a new Inline for rdoc and reference.

rdoc may be another Inline or a String. If reference is not given it will use the text from rdoc.

 
               # File rdoc/rd/inline.rb, line 22
def self.new rdoc, reference = rdoc
  if self === rdoc and reference.equal? rdoc then
    rdoc
  else
    super
  end
end
            

Public Instance Methods

append(more) click to toggle source

Appends more to this inline. more may be a String or another Inline.

 
               # File rdoc/rd/inline.rb, line 49
def append more
  case more
  when String then
    @reference << more
    @rdoc      << more
  when RDoc::RD::Inline then
    @reference << more.reference
    @rdoc      << more.rdoc
  else
    raise "unknown thingy #{more}"
  end

  self
end
            

Protected Instance Methods

initialize(rdoc, reference) click to toggle source

Initializes the Inline with rdoc and inline

 
               # File rdoc/rd/inline.rb, line 33
def initialize rdoc, reference # :not-new:
  @reference = reference.equal?(rdoc) ? reference.dup : reference

  # unpack
  @reference = @reference.reference if self.class === @reference
  @rdoc      = rdoc
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus