Class: RD::RDVisitor

Inherits:
OutputFormatVisitor show all
Extended by:
Forwardable
Defined in:
lib/rd/rdvisitor.rb

Overview

for Backward compatibility

Constant Summary

Constants inherited from OutputFormatVisitor

OutputFormatVisitor::INCLUDE_SUFFIX, OutputFormatVisitor::OUTPUT_SUFFIX

Constants inherited from Visitor

Visitor::SYSTEM_NAME, Visitor::SYSTEM_VERSION, Visitor::VERSION

Instance Attribute Summary

Attributes inherited from OutputFormatVisitor

#filename, #include_suffix, #input_filename

Instance Method Summary collapse

Methods inherited from OutputFormatVisitor

#apply_to_Include, #initialize

Methods included from SearchFile

#search_file

Methods inherited from Visitor

define_visit_Nonterminal, define_visit_Terminal, version, #visit, #visit_DescListItem, #visit_MethodListItem, #visit_Reference, #visit_children

Constructor Details

This class inherits a constructor from RD::OutputFormatVisitor

Instance Method Details

#apply_to_DescListItemTerm(element, contents) ⇒ Object



11
12
13
# File 'lib/rd/rdvisitor.rb', line 11

def apply_to_DescListItemTerm(element, contents)
  contents
end

#apply_to_MethodListItemTerm(element) ⇒ Object



15
16
17
# File 'lib/rd/rdvisitor.rb', line 15

def apply_to_MethodListItemTerm(element)
  apply_to_String(element.content)
end

#prepare_labels(tree, prefix = "label:") ⇒ Object



23
24
25
# File 'lib/rd/rdvisitor.rb', line 23

def prepare_labels(tree, prefix = "label:")
  @reference_resolver = ReferenceResolver.new(tree, prefix)
end

#refer_external(label) ⇒ Object



31
32
33
34
35
# File 'lib/rd/rdvisitor.rb', line 31

def refer_external(label)
  label = @reference_resolver.refer_external_file(label)
  return nil unless label
  label[1]
end