Class: RT::RTVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/rt/rtvisitor.rb

Direct Known Subclasses

RT2HTMLVisitor

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRTVisitor

Returns a new instance of RTVisitor.



20
21
# File 'lib/rt/rtvisitor.rb', line 20

def initialize
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



22
23
24
# File 'lib/rt/rtvisitor.rb', line 22

def body
  @body
end

#captionObject (readonly)

Returns the value of attribute caption.



22
23
24
# File 'lib/rt/rtvisitor.rb', line 22

def caption
  @caption
end

#charcodeObject

Returns the value of attribute charcode.



23
24
25
# File 'lib/rt/rtvisitor.rb', line 23

def charcode
  @charcode
end

#filenameObject

Returns the value of attribute filename.



23
24
25
# File 'lib/rt/rtvisitor.rb', line 23

def filename
  @filename
end

#headerObject (readonly)

Returns the value of attribute header.



22
23
24
# File 'lib/rt/rtvisitor.rb', line 22

def header
  @header
end

#rtObject (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

#setupObject



43
44
45
# File 'lib/rt/rtvisitor.rb', line 43

def setup
  ""
end

#teardownObject



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_BodyObject



59
60
61
# File 'lib/rt/rtvisitor.rb', line 59

def visit_Body
  ""
end

#visit_CaptionObject



51
52
53
# File 'lib/rt/rtvisitor.rb', line 51

def visit_Caption
  ""
end

#visit_HeaderObject



55
56
57
# File 'lib/rt/rtvisitor.rb', line 55

def visit_Header
  ""
end