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



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

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

#bigcell_endObject



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

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

#cell_beginObject



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_endObject



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

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

#header_beginObject



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_endObject



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

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

#headers_beginObject



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

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

#headers_endObject



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

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

#renderObject



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

def render
  @str
end

#row_beginObject



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

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

#row_endObject



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_endObject



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

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