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
49 50 51 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 49 def bigcell_begin @str << "<td colspan=\"3\"><h5>" end |
#bigcell_end ⇒ Object
53 54 55 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 53 def bigcell_end @str << "</h5></td>" end |
#cell_begin ⇒ Object
41 42 43 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 41 def cell_begin @str << "<td>" end |
#cell_content(str) ⇒ Object
57 58 59 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 57 def cell_content(str) @str << str end |
#cell_end ⇒ Object
45 46 47 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 45 def cell_end @str << "</td>" end |
#header_begin ⇒ Object
21 22 23 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 21 def header_begin @str << "<th>" end |
#header_content(str) ⇒ Object
29 30 31 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 29 def header_content(str) @str << str end |
#header_end ⇒ Object
25 26 27 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 25 def header_end @str << "</th>" end |
#headers_begin ⇒ Object
13 14 15 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 13 def headers_begin @str << "<thead><tr>" end |
#headers_end ⇒ Object
17 18 19 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 17 def headers_end @str << "</tr></thead>" end |
#render ⇒ Object
61 62 63 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 61 def render @str end |
#row_begin ⇒ Object
33 34 35 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 33 def row_begin @str << "<tr>" end |
#row_end ⇒ Object
37 38 39 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 37 def row_end @str << "</tr>" end |
#table_begin(css_class = "table-condensed") ⇒ Object
5 6 7 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 5 def table_begin(css_class="table-condensed") @str << "<table class=\"table #{css_class}\">" end |
#table_end ⇒ Object
9 10 11 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 9 def table_end @str << "</table>" end |