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
50 51 52 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 50 def bigcell_begin @str << "<td colspan=\"3\"><h5>" end |
#bigcell_end ⇒ Object
54 55 56 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 54 def bigcell_end @str << "</h5></td>" end |
#cell_begin ⇒ Object
42 43 44 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 42 def cell_begin @str << "<td>" end |
#cell_content(str) ⇒ Object
58 59 60 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 58 def cell_content(str) @str << str end |
#cell_end ⇒ Object
46 47 48 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 46 def cell_end @str << "</td>" end |
#header_begin ⇒ Object
22 23 24 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 22 def header_begin @str << "<th>" end |
#header_content(str) ⇒ Object
30 31 32 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 30 def header_content(str) @str << str unless str.nil? end |
#header_end ⇒ Object
26 27 28 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 26 def header_end @str << "</th>" end |
#headers_begin ⇒ Object
14 15 16 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 14 def headers_begin @str << "<thead><tr>" end |
#headers_end ⇒ Object
18 19 20 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 18 def headers_end @str << "</tr></thead>" end |
#render ⇒ Object
62 63 64 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 62 def render @str end |
#row_begin ⇒ Object
34 35 36 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 34 def row_begin @str << "<tr>" end |
#row_end ⇒ Object
38 39 40 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 38 def row_end @str << "</tr>" end |
#table_begin(css_class = "table-condensed") ⇒ Object
6 7 8 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 6 def table_begin(css_class="table-condensed") @str << "<table class=\"table #{css_class}\">" end |
#table_end ⇒ Object
10 11 12 |
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 10 def table_end @str << "</table>" end |