Class: RDoc::Markup::Rule

Inherits:
Struct
  • Object
show all
Defined in:
lib/rdoc/markup/rule.rb

Overview

A horizontal rule with a weight

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#weightObject

Returns the value of attribute weight

Returns:

  • (Object)

    the current value of weight


4
5
6
# File 'lib/rdoc/markup/rule.rb', line 4

def weight
  @weight
end

Instance Method Details

#accept(visitor) ⇒ Object

Calls #accept_rule on visitor


9
10
11
# File 'lib/rdoc/markup/rule.rb', line 9

def accept visitor
  visitor.accept_rule self
end

#pretty_print(q) ⇒ Object

:nodoc:


13
14
15
16
17
# File 'lib/rdoc/markup/rule.rb', line 13

def pretty_print q # :nodoc:
  q.group 2, '[rule:', ']' do
    q.pp weight
  end
end