File tree Expand file tree Collapse file tree 1 file changed +29
-12
lines changed
Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
2- ##
3- # A horizontal rule with a weight
42
5- class RDoc ::Markup ::Rule < Struct . new :weight
3+ module RDoc
4+ class Markup
5+ # A horizontal rule with a weight
6+ class Rule < Element
7+ #: Integer
8+ attr_reader :weight
69
7- ##
8- # Calls #accept_rule on +visitor+
10+ #: (Integer) -> void
11+ def initialize ( weight )
12+ super ( )
13+ @weight = weight
14+ end
915
10- def accept ( visitor )
11- visitor . accept_rule self
12- end
16+ #: (top) -> bool
17+ def ==( other )
18+ other . is_a? ( Rule ) && other . weight == @weight
19+ end
20+
21+ # Calls #accept_rule on +visitor+
22+ # @override
23+ #: (untyped) -> void
24+ def accept ( visitor )
25+ visitor . accept_rule ( self )
26+ end
1327
14- def pretty_print ( q ) # :nodoc:
15- q . group 2 , '[rule:' , ']' do
16- q . pp weight
28+ # @override
29+ #: (PP) -> void
30+ def pretty_print ( q ) # :nodoc:
31+ q . group ( 2 , '[rule:' , ']' ) do
32+ q . pp ( weight )
33+ end
34+ end
1735 end
1836 end
19-
2037end
You can’t perform that action at this time.
0 commit comments