Class: RT::RTVisitor
- Inherits:
-
Object
- Object
- RT::RTVisitor
- Defined in:
- lib/rt/rtvisitor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#charcode ⇒ Object
Returns the value of attribute charcode.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#rt ⇒ Object
readonly
Returns the value of attribute rt.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ RTVisitor
constructor
A new instance of RTVisitor.
- #setup ⇒ Object
- #teardown ⇒ Object
- #visit(parsed) ⇒ Object
- #visit_Body ⇒ Object
- #visit_Caption ⇒ Object
- #visit_Header ⇒ Object
Constructor Details
#initialize ⇒ RTVisitor
Returns a new instance of RTVisitor.
19 20 |
# File 'lib/rt/rtvisitor.rb', line 19 def initialize end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
21 22 23 |
# File 'lib/rt/rtvisitor.rb', line 21 def body @body end |
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
21 22 23 |
# File 'lib/rt/rtvisitor.rb', line 21 def @caption end |
#charcode ⇒ Object
Returns the value of attribute charcode.
22 23 24 |
# File 'lib/rt/rtvisitor.rb', line 22 def charcode @charcode end |
#filename ⇒ Object
Returns the value of attribute filename.
22 23 24 |
# File 'lib/rt/rtvisitor.rb', line 22 def filename @filename end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
21 22 23 |
# File 'lib/rt/rtvisitor.rb', line 21 def header @header end |
#rt ⇒ Object (readonly)
Returns the value of attribute rt.
21 22 23 |
# File 'lib/rt/rtvisitor.rb', line 21 def rt @rt end |
Class Method Details
.visit(parsed) ⇒ Object
24 25 26 |
# File 'lib/rt/rtvisitor.rb', line 24 def self.visit(parsed) self::new.visit(parsed) end |
Instance Method Details
#setup ⇒ Object
38 39 40 |
# File 'lib/rt/rtvisitor.rb', line 38 def setup "" end |
#teardown ⇒ Object
42 43 44 |
# File 'lib/rt/rtvisitor.rb', line 42 def teardown "" end |
#visit(parsed) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/rt/rtvisitor.rb', line 28 def visit(parsed) @filename = @charset = nil @rt = parsed @header = @rt.header @body = @rt.body @caption = @rt.config['caption'] setup + visit_Caption + visit_Header + visit_Body + teardown end |
#visit_Body ⇒ Object
54 55 56 |
# File 'lib/rt/rtvisitor.rb', line 54 def visit_Body "" end |
#visit_Caption ⇒ Object
46 47 48 |
# File 'lib/rt/rtvisitor.rb', line 46 def visit_Caption "" end |
#visit_Header ⇒ Object
50 51 52 |
# File 'lib/rt/rtvisitor.rb', line 50 def visit_Header "" end |