Class: BootstrapMarkup
- Inherits:
-
Object
- Object
- BootstrapMarkup
- Defined in:
- lib/coursegen/course/helpers/bootstrap_markup.rb
Instance Method Summary collapse
- #bigcell_begin ⇒ Object
- #bigcell_end ⇒ Object
- #cell_begin ⇒ Object
- #cell_content(str) ⇒ Object
- #cell_end ⇒ Object
- #header_begin ⇒ Object
- #header_content(str) ⇒ Object
- #header_end ⇒ Object
- #headers_begin ⇒ Object
- #headers_end ⇒ Object
-
#initialize ⇒ BootstrapMarkup
constructor
A new instance of BootstrapMarkup.
- #render ⇒ Object
- #row_begin ⇒ Object
- #row_end ⇒ Object
- #table_begin(css_class = "table-condensed") ⇒ Object
- #table_end ⇒ Object
Constructor Details
#initialize ⇒ BootstrapMarkup
Returns a new instance of BootstrapMarkup.
2 3 4 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 2 def initialize @str = "" end |
Instance Method Details
#bigcell_begin ⇒ Object
52 53 54 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 52 def bigcell_begin @str << "<td colspan=\"3\"><h5>" end |
#bigcell_end ⇒ Object
56 57 58 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 56 def bigcell_end @str << "</h5></td>" end |
#cell_begin ⇒ Object
44 45 46 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 44 def cell_begin @str << "<td>" end |
#cell_content(str) ⇒ Object
60 61 62 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 60 def cell_content(str) @str << str end |
#cell_end ⇒ Object
48 49 50 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 48 def cell_end @str << "</td>" end |
#header_begin ⇒ Object
24 25 26 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 24 def header_begin @str << "<th>" end |
#header_content(str) ⇒ Object
32 33 34 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 32 def header_content(str) @str << str unless str.nil? end |
#header_end ⇒ Object
28 29 30 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 28 def header_end @str << "</th>" end |
#headers_begin ⇒ Object
16 17 18 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 16 def headers_begin @str << "<thead><tr>" end |
#headers_end ⇒ Object
20 21 22 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 20 def headers_end @str << "</tr></thead>" end |
#render ⇒ Object
64 65 66 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 64 def render @str end |
#row_begin ⇒ Object
36 37 38 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 36 def row_begin @str << "<tr>" end |
#row_end ⇒ Object
40 41 42 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 40 def row_end @str << "</tr>" end |
#table_begin(css_class = "table-condensed") ⇒ Object
6 7 8 9 10 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 6 def table_begin(css_class = "table-condensed") puts css_class.class @str << "<table class=\"table x #{css_class}\">" puts @str end |
#table_end ⇒ Object
12 13 14 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 12 def table_end @str << "</table>" end |