Class: PinkShirt::SAX::Tables

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

Constant Summary collapse

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



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

def end_table
end

#end_tbodyObject



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

def end_tbody
end

#end_tdObject



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

def end_td
end

#end_thObject



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

def end_th
end

#end_theadObject



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

def end_thead
end

#end_trObject



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

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

#start_table(attrs) ⇒ Object



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

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

#start_tbody(attrs) ⇒ Object



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

def start_tbody attrs
end

#start_td(attrs) ⇒ Object

| or |(someclass). , never |.



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

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

#start_th(attrs) ⇒ Object



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

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

#start_thead(attrs) ⇒ Object



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

def start_thead attrs
end

#start_tr(attrs) ⇒ Object



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

def start_tr attrs
end