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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5663fb4576c922d03561f3c769b18f55a0abed15
4
- data.tar.gz: 1bc88493e674d9d5c2d9e0450a7298f7a89a5baa
3
+ metadata.gz: e626f9951a93169c89f09d5b4cce446d4237f267
4
+ data.tar.gz: ab14e94836e8b8500a0b05d4cb8941ce12acfdc5
5
5
  SHA512:
6
- metadata.gz: aacbd4f1728b5e97fdef4f576a5e3a3ba3e283e489359f0bd59c173f212e7b779c4ea91dff0d2305982e2f9c4cb0d3374ac26acf770df8c775bb531839217662
7
- data.tar.gz: f9dedbfb42ca468c72e03304158511c75964d41a2eb9a153abe7d919d7cc7264bc938b55694facdc7f379431d2380f165e242d341cef2af8ba2a2bd9b3477916
6
+ metadata.gz: 421ba3b495ab1318c018e97b61891720c66d7c11f4ed682eef89b7115f1636b0de39ed941a363800059a0abca8eb08201f570cea634544fe4848df171738da13
7
+ data.tar.gz: 8e11fb73b57f5f74884bdfc6f177c2a32d1d88c7751ef93368a50e9201cf62d37798b572edaf522adebaf594ab12a634f90ab07c0634426c4c540fc7458740a8
@@ -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
- cache[:tmpl][name] = { dom: remove ? dom.remove : dom }
332
- cache[:tmpl][name][:html] = cache[:tmpl][name][:dom].to_xhtml
333
- cache[:tmpl][name]
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
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.56"
3
+ VERSION = "0.1.57"
4
4
  end
5
5
  end
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.56
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 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal