Class: ConTeXtSetup::Parameter
- Defined in:
- lib/tex/context/contextsetup.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
Returns the value of attribute list.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(interface) ⇒ Parameter
constructor
parse_xml.
- #parse_xml(elt) ⇒ Object
- #to_html(detail = true) ⇒ Object
Methods inherited from Param
#opt, #optional?, #sanitize_html, #show
Methods inherited from SetupXML
Constructor Details
#initialize(interface) ⇒ Parameter
parse_xml
647 648 649 650 651 |
# File 'lib/tex/context/contextsetup.rb', line 647 def initialize(interface) @interface=interface @name=nil @list=[] end |
Instance Attribute Details
#list ⇒ Object
Returns the value of attribute list.
632 633 634 |
# File 'lib/tex/context/contextsetup.rb', line 632 def list @list end |
#name ⇒ Object
Returns the value of attribute name.
632 633 634 |
# File 'lib/tex/context/contextsetup.rb', line 632 def name @name end |
Instance Method Details
#==(other) ⇒ Object
660 661 662 |
# File 'lib/tex/context/contextsetup.rb', line 660 def ==(other) Parameter===other && @name==other.name && @list==other.list end |
#parse_xml(elt) ⇒ Object
633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
# File 'lib/tex/context/contextsetup.rb', line 633 def parse_xml(elt) @name=elt.attributes["name"] elt.each_element do |elt| case elt.name when "constant" @list << elt.attributes["type"] when "resolve" @list = @interface.defines[elt.attributes["name"]].keywords else raise "not implemented yet: Parameter/#{elt.name}" end end end |
#to_html(detail = true) ⇒ Object
652 653 654 655 656 657 658 659 |
# File 'lib/tex/context/contextsetup.rb', line 652 def to_html(detail=true) if detail sanitize_html @list.join(" ") else @name end end |