roda-component 0.1.56 → 0.1.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roda/component.rb +8 -4
- data/lib/roda/component/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e626f9951a93169c89f09d5b4cce446d4237f267
|
4
|
+
data.tar.gz: ab14e94836e8b8500a0b05d4cb8941ce12acfdc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 421ba3b495ab1318c018e97b61891720c66d7c11f4ed682eef89b7115f1636b0de39ed941a363800059a0abca8eb08201f570cea634544fe4848df171738da13
|
7
|
+
data.tar.gz: 8e11fb73b57f5f74884bdfc6f177c2a32d1d88c7751ef93368a50e9201cf62d37798b572edaf522adebaf594ab12a634f90ab07c0634426c4c540fc7458740a8
|
data/lib/roda/component.rb
CHANGED
@@ -327,10 +327,14 @@ class Roda
|
|
327
327
|
|
328
328
|
# We need to save the oga dom and the raw html.
|
329
329
|
# the reason we ave the raw html is so that we can use it client side.
|
330
|
-
def tmpl name, dom, remove = true
|
331
|
-
|
332
|
-
|
333
|
-
|
330
|
+
def tmpl name, dom = false, remove = true
|
331
|
+
if dom
|
332
|
+
cache[:tmpl][name] = { dom: remove ? dom.remove : dom }
|
333
|
+
cache[:tmpl][name][:html] = cache[:tmpl][name][:dom].to_xhtml
|
334
|
+
cache[:tmpl][name]
|
335
|
+
elsif t = cache[:tmpl][name]
|
336
|
+
DOM.new t[:html]
|
337
|
+
end
|
334
338
|
end
|
335
339
|
alias :add_tmpl :tmpl
|
336
340
|
alias :set_tmpl :tmpl
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roda-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.57
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|