roda-component 0.1.47 → 0.1.48
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/version.rb +1 -1
- data/lib/roda/component.rb +8 -4
- data/lib/roda/plugins/component.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: ad6c2b14f1d526e6b5f8853508477823396d086a
|
4
|
+
data.tar.gz: 43638f0a8d10315bcff452763f2521cf7806eb13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b2ef520e19cc645682e4605764b3eaa533c0b79872bc9cccc9f3be99b11fca0b370d53b6a5cd2d43aa36d1bb2352329189cb79f201d0d197da1143ff8e1e32
|
7
|
+
data.tar.gz: 10cb7029004e83e18fd3ac5a58102a96d78ca0ffd422baaa2aca1540b7106495a54acff89dd9373f0b0b5eb60135d3c542660740b52df6b4050a35a495f8d869
|
data/lib/roda/component.rb
CHANGED
@@ -170,11 +170,15 @@ class Roda
|
|
170
170
|
m.public_instance_methods(false).each do |meth|
|
171
171
|
alias_method :"original_#{meth}", :"#{meth}"
|
172
172
|
define_method "#{meth}" do |*args, &blk|
|
173
|
-
|
174
|
-
|
173
|
+
o_name = "original_#{meth}"
|
174
|
+
|
175
|
+
if method(o_name).parameters.length > 0
|
176
|
+
result = send(o_name, *args, &block)
|
175
177
|
else
|
176
|
-
send(
|
178
|
+
result = send(o_name, &block)
|
177
179
|
end
|
180
|
+
|
181
|
+
blk ? blk.call(result) : result
|
178
182
|
end
|
179
183
|
end
|
180
184
|
else
|
@@ -239,7 +243,7 @@ class Roda
|
|
239
243
|
end
|
240
244
|
|
241
245
|
# The html source
|
242
|
-
def comp_html _html, &block
|
246
|
+
def comp_html _html = false, &block
|
243
247
|
if server?
|
244
248
|
if _html.is_a? String
|
245
249
|
if _html[%r{\A./}]
|
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.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|