coursegen 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1488b4ce9e43154da3d9fb90e139ac2591628d2
|
4
|
+
data.tar.gz: ed13f0a83abc755f3393910ad7944dc110b5cc86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67aacc444ce5b61a2f73125db77f87d8d53fbd01ab7c3cbad5cb96cafcc63edef413aad60c51920e91513d2c4517d24df7d7a6f8d05b030e38da8d1b7bc786fe
|
7
|
+
data.tar.gz: 3307156acca19e5424254175e17cfcca55840143528a2bb7a2e5a3304ad8bc5f0e2ab373ffbead87d8a6a2f482ab7331cdbe765b52787d9f44215dceb74f8794
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class TableHelper
|
2
|
+
def initialize(property)
|
3
|
+
@prop = property
|
4
|
+
@bm = BootstrapMarkup.new
|
5
|
+
end
|
6
|
+
|
7
|
+
def headers(*labels)
|
8
|
+
css_style = @prop == :normal ? "table-condensed" : ""
|
9
|
+
@bm.table_begin(css_style)
|
10
|
+
@bm.headers_begin
|
11
|
+
labels.each do |h|
|
12
|
+
@bm.header_begin
|
13
|
+
@bm.header_content(h)
|
14
|
+
@bm.header_end
|
15
|
+
end
|
16
|
+
@bm.headers_end
|
17
|
+
end
|
18
|
+
|
19
|
+
def row(*cells)
|
20
|
+
@bm.row_begin
|
21
|
+
cells.each do |c|
|
22
|
+
@bm.cell_begin
|
23
|
+
@bm.cell_content(c)
|
24
|
+
@bm.cell_end
|
25
|
+
end
|
26
|
+
@bm.row_end
|
27
|
+
end
|
28
|
+
|
29
|
+
def render()
|
30
|
+
@bm.table_end
|
31
|
+
@bm.render
|
32
|
+
end
|
33
|
+
end
|
data/lib/coursegen/version.rb
CHANGED
data/lib/coursegen.rb
CHANGED
@@ -7,6 +7,7 @@ require "coursegen/course/helpers/content_helpers"
|
|
7
7
|
require "coursegen/course/helpers/logging_helpers"
|
8
8
|
require "coursegen/course/helpers/list_of_helpers"
|
9
9
|
require 'coursegen/course/helpers/bootstrap_markup'
|
10
|
+
require 'coursegen/course/helpers/table_helpers'
|
10
11
|
require "coursegen/course/helpers/navigation_helpers"
|
11
12
|
require "coursegen/course/data/section"
|
12
13
|
require "coursegen/course/data/toc"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coursegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pito Salas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -219,13 +219,13 @@ files:
|
|
219
219
|
- lib/coursegen/course/data/toc.rb
|
220
220
|
- lib/coursegen/course/helpers/bootstrap_markup.rb
|
221
221
|
- lib/coursegen/course/helpers/content_helpers.rb
|
222
|
-
- lib/coursegen/course/helpers/deleteme.rb
|
223
222
|
- lib/coursegen/course/helpers/lecture_helpers.rb
|
224
223
|
- lib/coursegen/course/helpers/list_of.rb
|
225
224
|
- lib/coursegen/course/helpers/list_of_helpers.rb
|
226
225
|
- lib/coursegen/course/helpers/logging_helpers.rb
|
227
226
|
- lib/coursegen/course/helpers/navigation_helpers.rb
|
228
227
|
- lib/coursegen/course/helpers/sidebar_helpers.rb
|
228
|
+
- lib/coursegen/course/helpers/table_helpers.rb
|
229
229
|
- lib/coursegen/course/lib/helpers_.rb
|
230
230
|
- lib/coursegen/course/lib/search_data_generator.rb
|
231
231
|
- lib/coursegen/course/lib/toc.rb
|