Class: RDoc::Markup::HardBreak

Inherits:
Element
  • Object
show all
Defined in:
lib/rdoc/markup/hard_break.rb

Overview

A hard-break in the middle of a paragraph.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.newObject

RDoc::Markup::HardBreak is a singleton : () -> HardBreak



11
12
13
# File 'lib/rdoc/markup/hard_break.rb', line 11

def self.new
  @instance
end

Instance Method Details

#==(other) ⇒ Object

: (top) -> bool



23
24
25
# File 'lib/rdoc/markup/hard_break.rb', line 23

def ==(other) # :nodoc:
  self.class === other
end

#accept(visitor) ⇒ Object

Calls #accept_hard_break on visitor : (untyped) -> void



18
19
20
# File 'lib/rdoc/markup/hard_break.rb', line 18

def accept(visitor)
  visitor.accept_hard_break(self)
end

#pretty_print(q) ⇒ Object

: (PP) -> void



29
30
31
# File 'lib/rdoc/markup/hard_break.rb', line 29

def pretty_print(q) # :nodoc:
  q.text("[break]")
end