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: 2320b5918cf59b1c0833aaece857f0877c7f23fe
4
- data.tar.gz: f43633199e8da954aa8248f98cd40e329834a5d9
3
+ metadata.gz: d1488b4ce9e43154da3d9fb90e139ac2591628d2
4
+ data.tar.gz: ed13f0a83abc755f3393910ad7944dc110b5cc86
5
5
  SHA512:
6
- metadata.gz: 668c3ad6ca1d5a49fb4917e0272f09f5ed6d685be8bdd16c439c5aa2ba4874c7f704d09e3f093bdb62bbe1a50388d60f77ec04f823a40f88d68e13ad4f7e165b
7
- data.tar.gz: d66bd04b7100b1ee763a7a848343b66a4ecd400b7c9a6c29149f2223cb6bfce9f55a9c0ed6177644b938ce6edfa75e365ff1c6fe8ae162c8b5b1fe14afce84b6
6
+ metadata.gz: 67aacc444ce5b61a2f73125db77f87d8d53fbd01ab7c3cbad5cb96cafcc63edef413aad60c51920e91513d2c4517d24df7d7a6f8d05b030e38da8d1b7bc786fe
7
+ data.tar.gz: 3307156acca19e5424254175e17cfcca55840143528a2bb7a2e5a3304ad8bc5f0e2ab373ffbead87d8a6a2f482ab7331cdbe765b52787d9f44215dceb74f8794
@@ -2,8 +2,8 @@ class BootstrapMarkup
2
2
  def initialize
3
3
  @str = ""
4
4
  end
5
- def table_begin
6
- @str << "<table class=\"table table-condensed\">"
5
+ def table_begin(css_class="table-condensed")
6
+ @str << "<table class=\"table #{css_class}\">"
7
7
  end
8
8
 
9
9
  def table_end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Coursegen
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-04 00:00:00.000000000 Z
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
@@ -1,2 +0,0 @@
1
- puts "hello" +
2
- "goodbye"