Class: BootstrapMarkup

Inherits:
Object
  • Object
show all
Defined in:
lib/coursegen/course/helpers/bootstrap_markup.rb

Instance Method Summary collapse

Constructor Details

#initializeBootstrapMarkup

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_beginObject



49
50
51
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 49

def bigcell_begin
  @str << "<td colspan=\"3\"><h5>"
end

#bigcell_endObject



53
54
55
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 53

def bigcell_end
  @str << "</h5></td>"
end

#cell_beginObject



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_endObject



45
46
47
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 45

def cell_end
  @str << "</td>"
end

#header_beginObject



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_endObject



25
26
27
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 25

def header_end
  @str << "</th>"
end

#headers_beginObject



13
14
15
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 13

def headers_begin
  @str << "<thead><tr>"
end

#headers_endObject



17
18
19
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 17

def headers_end
  @str << "</tr></thead>"
end

#renderObject



61
62
63
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 61

def render
  @str
end

#row_beginObject



33
34
35
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 33

def row_begin
  @str << "<tr>"
end

#row_endObject



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_endObject



9
10
11
# File 'lib/coursegen/course/helpers/bootstrap_markup.rb', line 9

def table_end
  @str << "</table>"
end