Class: ConTeXtSetup::Content

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Param

#opt, #optional?, #sanitize_html

Methods inherited from SetupXML

parse_xml, tag_method

Constructor Details

#initialize(interface) ⇒ Content

parse_xml



593
594
595
596
# File 'lib/tex/context/contextsetup.rb', line 593

def initialize(interface)
  @interface=interface
  @list=false
end

Instance Attribute Details

#listObject

Returns the value of attribute list.



589
590
591
# File 'lib/tex/context/contextsetup.rb', line 589

def list
  @list
end

Instance Method Details

#==(other) ⇒ Object



605
606
607
# File 'lib/tex/context/contextsetup.rb', line 605

def ==(other)
  Content===other && @list == other.list
end

#parse_xml(elt) ⇒ Object



590
591
592
# File 'lib/tex/context/contextsetup.rb', line 590

def parse_xml(elt)
  @list = elt.attributes["list"] == "yes"
end

#to_html(detail = true, cls = 'first') ⇒ Object



597
598
599
600
601
602
603
604
# File 'lib/tex/context/contextsetup.rb', line 597

def to_html(detail=true,cls='first')
  head = show
  if detail
    tr{  td(:class => cls) { head } + td(:class => cls) { "<i>text</i>" } }
  else
    head
  end
end