1# frozen_string_literal: true
2##
3# A hard-break in the middle of a paragraph.
4
5class RDoc::Markup::HardBreak
6
7  @instance = new
8
9  ##
10  # RDoc::Markup::HardBreak is a singleton
11
12  def self.new
13    @instance
14  end
15
16  ##
17  # Calls #accept_hard_break on +visitor+
18
19  def accept visitor
20    visitor.accept_hard_break self
21  end
22
23  def == other # :nodoc:
24    self.class === other
25  end
26
27  def pretty_print q # :nodoc:
28    q.text "[break]"
29  end
30
31end
32
33