1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/rdoc/markup/rule.rb

21 lines
285 B
Ruby
Raw Normal View History

##
# A horizontal rule with a weight
class RDoc::Markup::Rule < Struct.new :weight
##
# Calls #accept_rule on +visitor+
def accept visitor
visitor.accept_rule self
end
def pretty_print q # :nodoc:
q.group 2, '[rule:', ']' do
q.pp weight
end
end
end