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



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

def weight
  @weight
end

Instance Method Details

#accept(visitor) ⇒ Object

Calls #accept_rule on visitor



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

def accept visitor
  visitor.accept_rule self
end

#pretty_print(q) ⇒ Object

:nodoc:



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

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