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.



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

def initialize
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#captionObject (readonly)

Returns the value of attribute caption.



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

def caption
  @caption
end

#charcodeObject

Returns the value of attribute charcode.



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

def charcode
  @charcode
end

#filenameObject

Returns the value of attribute filename.



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

def filename
  @filename
end

#headerObject (readonly)

Returns the value of attribute header.



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

def header
  @header
end

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

#setupObject



38
39
40
# File 'lib/rt/rtvisitor.rb', line 38

def setup
  ""
end

#teardownObject



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_BodyObject



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

def visit_Body
  ""
end

#visit_CaptionObject



46
47
48
# File 'lib/rt/rtvisitor.rb', line 46

def visit_Caption
  ""
end

#visit_HeaderObject



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

def visit_Header
  ""
end