Class: ConTeXtSetup::SetupXML

Inherits:
Object
  • Object
show all
Defined in:
lib/tex/context/contextsetup.rb

Overview

The parse_xml interface for the helper classes.

Direct Known Subclasses

Command, Define, Interface, Param, Sequence

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSetupXML

Returns a new instance of SetupXML.



60
61
# File 'lib/tex/context/contextsetup.rb', line 60

def initialize
end

Class Method Details

.parse_xml(elt, interface) ⇒ Object



39
40
41
42
43
# File 'lib/tex/context/contextsetup.rb', line 39

def parse_xml(elt,interface)
  t=new(interface)
  t.parse_xml(elt)
  return t
end

.tag_method(*names) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/tex/context/contextsetup.rb', line 44

def tag_method(*names)
  names.each do |sym|
    class_eval %{
      def #{sym}(options={},&block)
        tmp=""
        options.each do |key,value| 
          tmp << " " + key.to_s + "='" + value.to_s +  "'"
        end
        "<#{sym}" + tmp.to_s + ">" + (block ? block.call.to_s : "") + "</#{sym}>"
      end
    }
  end
end

Instance Method Details

#parse_xml(elt) ⇒ Object



63
64
# File 'lib/tex/context/contextsetup.rb', line 63

def parse_xml(elt)
end