Class: PinkShirt::SAX::Tables

Inherits:
Base
  • Object
show all
Defined in:
lib/pink_shirt/sax/tables.rb

Constant Summary

TAGS =
%w(table th tr td tbody thead)

Instance Method Summary collapse

Methods inherited from Base

#add_attributes, #initialize, #method_missing, #to_s

Constructor Details

This class inherits a constructor from PinkShirt::SAX::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PinkShirt::SAX::Base

Instance Method Details

#end_tableObject



11
12
# File 'lib/pink_shirt/sax/tables.rb', line 11

def end_table
end

#end_tbodyObject



16
17
# File 'lib/pink_shirt/sax/tables.rb', line 16

def end_tbody
end

#end_tdObject



48
49
# File 'lib/pink_shirt/sax/tables.rb', line 48

def end_td
end

#end_thObject



36
37
# File 'lib/pink_shirt/sax/tables.rb', line 36

def end_th
end

#end_theadObject



22
23
# File 'lib/pink_shirt/sax/tables.rb', line 22

def end_thead
end

#end_trObject



28
29
30
# File 'lib/pink_shirt/sax/tables.rb', line 28

def end_tr
  @output << "|\n"
end

#start_table(attrs) ⇒ Object



5
6
7
8
9
# File 'lib/pink_shirt/sax/tables.rb', line 5

def start_table attrs
  if add_attributes(attrs)
   @output << "table#{add_attributes(attrs)}.\n" 
  end
end

#start_tbody(attrs) ⇒ Object



13
14
# File 'lib/pink_shirt/sax/tables.rb', line 13

def start_tbody attrs
end

#start_td(attrs) ⇒ Object

| or |(someclass). , never |.



40
41
42
43
44
45
46
# File 'lib/pink_shirt/sax/tables.rb', line 40

def start_td attrs
  if add_attributes(attrs)
    @output << "|#{add_attributes(attrs)}. "
  else
    @output << "|"
  end
end

#start_th(attrs) ⇒ Object



32
33
34
# File 'lib/pink_shirt/sax/tables.rb', line 32

def start_th attrs
  @output << "|#{add_attributes(attrs)}_. "
end

#start_thead(attrs) ⇒ Object



19
20
# File 'lib/pink_shirt/sax/tables.rb', line 19

def start_thead attrs
end

#start_tr(attrs) ⇒ Object



25
26
# File 'lib/pink_shirt/sax/tables.rb', line 25

def start_tr attrs
end