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.
20 21 |
# File 'lib/rt/rtvisitor.rb', line 20 def initialize end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
22 23 24 |
# File 'lib/rt/rtvisitor.rb', line 22 def body @body end |
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
22 23 24 |
# File 'lib/rt/rtvisitor.rb', line 22 def @caption end |
#charcode ⇒ Object
Returns the value of attribute charcode.
23 24 25 |
# File 'lib/rt/rtvisitor.rb', line 23 def charcode @charcode end |
#filename ⇒ Object
Returns the value of attribute filename.
23 24 25 |
# File 'lib/rt/rtvisitor.rb', line 23 def filename @filename end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
22 23 24 |
# File 'lib/rt/rtvisitor.rb', line 22 def header @header end |
#rt ⇒ Object (readonly)
Returns the value of attribute rt.
22 23 24 |
# File 'lib/rt/rtvisitor.rb', line 22 def rt @rt end |
Class Method Details
.visit(parsed) ⇒ Object
25 26 27 |
# File 'lib/rt/rtvisitor.rb', line 25 def self.visit(parsed) self::new.visit(parsed) end |
Instance Method Details
#setup ⇒ Object
43 44 45 |
# File 'lib/rt/rtvisitor.rb', line 43 def setup "" end |
#teardown ⇒ Object
47 48 49 |
# File 'lib/rt/rtvisitor.rb', line 47 def teardown "" end |
#visit(parsed) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rt/rtvisitor.rb', line 29 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
59 60 61 |
# File 'lib/rt/rtvisitor.rb', line 59 def visit_Body "" end |
#visit_Caption ⇒ Object
51 52 53 |
# File 'lib/rt/rtvisitor.rb', line 51 def visit_Caption "" end |
#visit_Header ⇒ Object
55 56 57 |
# File 'lib/rt/rtvisitor.rb', line 55 def visit_Header "" end |