Class: RDoc::Markup::Raw
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Subclasses:
|
|
| Inherits: | Object |
| Defined in: | lib/rdoc/markup/raw.rb |
Overview
A section of text that is added to the output document as-is
Class Method Summary
-
.new(*parts) ⇒ Raw
constructor
Creates a new
Rawcontaining #parts : (*String) -> void.
Instance Attribute Summary
Instance Method Summary
-
#<<(text)
Appends #text : (String) -> void.
-
#accept(visitor)
Calls
#accept_raw+onvisitor: (untyped) -> void. -
#merge(other)
Appends
other‘s parts : (Raw) -> void. -
#push(*texts)
Appends
textsonto thisParagraph: (*String) -> void. -
#text
The raw text : () -> String.
-
#==(other)
Internal use only
: (top) -> bool.
-
#pretty_print(q)
Internal use only
: (PP) -> void.
Constructor Details
.new(*parts) ⇒ Raw
Creates a new Raw containing #parts : (*String) -> void
Instance Attribute Details
#parts (readonly)
The component parts of the list : Array
# File 'lib/rdoc/markup/raw.rb', line 9
attr_reader :parts
Instance Method Details
#<<(text)
Appends #text : (String) -> void
#==(other)
This method is for internal use only.
: (top) -> bool
# File 'lib/rdoc/markup/raw.rb', line 24
def ==(other) # :nodoc: self.class == other.class && @parts == other.parts end
#accept(visitor)
Calls #accept_raw+ on visitor : (untyped) -> void
# File 'lib/rdoc/markup/raw.rb', line 31
def accept(visitor) visitor.accept_raw(self) end
#merge(other)
Appends other‘s parts : (Raw) -> void
# File 'lib/rdoc/markup/raw.rb', line 37
def merge(other) @parts.concat(other.parts) end
#pretty_print(q)
This method is for internal use only.
: (PP) -> void
# File 'lib/rdoc/markup/raw.rb', line 43
def pretty_print(q) # :nodoc: self.class.name =~ /.*::(\w{1,4})/i q.group(2, "[#{$1.downcase}: ", ']') do q.seplist(@parts) do |part| q.pp(part) end end end
#push(*texts)
Appends texts onto this Paragraph : (*String) -> void
# File 'lib/rdoc/markup/raw.rb', line 55
def push(*texts) self.parts.concat(texts) end
#text
The raw text : () -> String
# File 'lib/rdoc/markup/raw.rb', line 61
def text @parts.join(" ") end