geny 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geny/context/view.rb +17 -0
- data/lib/geny/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: fe20ce2aad56f9d9ea091a83694d9a10704c4841
|
4
|
+
data.tar.gz: 81021763bcf6b5681f7fb428ce25ba47d9d21a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30433c06880fef7821d918ee93b7e4619c37a344e68817990c34e9a44131e72442c20cefc89c8347c08cd5004dc114f0b5398c654ed3638c4ac967a68810b35f
|
7
|
+
data.tar.gz: b618741dfd41d3f0fe8780486df2cd43101b7cc7e304cedf0e23831c1686cd287105cda75076b58b0f22a65f2c41ecf03cdfefdb89ff90562a417c7fb4781f82
|
data/lib/geny/context/view.rb
CHANGED
@@ -10,6 +10,23 @@ module Geny
|
|
10
10
|
def merge(updates)
|
11
11
|
View.new(command: command, locals: locals.merge(updates))
|
12
12
|
end
|
13
|
+
|
14
|
+
# Append to the output buffer
|
15
|
+
def concat(data)
|
16
|
+
@output_buffer << data
|
17
|
+
end
|
18
|
+
|
19
|
+
# Capture the ERB rendered inside a block
|
20
|
+
def capture(*args, &block)
|
21
|
+
@output_buffer, buffer_was = "", @output_buffer
|
22
|
+
|
23
|
+
begin
|
24
|
+
block.call(*args)
|
25
|
+
block.binding.eval("@output_buffer")
|
26
|
+
ensure
|
27
|
+
@output_buffer = buffer_was
|
28
|
+
end
|
29
|
+
end
|
13
30
|
end
|
14
31
|
end
|
15
32
|
end
|
data/lib/geny/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ray Zane
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: argy
|