trenni 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trenni/template.rb +11 -0
- data/lib/trenni/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3542181e14f5fed337b838c2ade044b487f9f65
|
4
|
+
data.tar.gz: b440daa0411f50da581a02c77f163a74a007a1b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee9347b54904e93f91d2153bbee549895763e16a1de8f0ed2d45e1fd54461a49fdb96d678c5de330fbf75a1b4417bff5bbddc865f6fc0734acd4e383d25c204c
|
7
|
+
data.tar.gz: 67a322f46cde72f4e629f56c8988a3db6b82d75c146e2e6ce92ecb5cdba3e0c54b16651ca6934871377d8daef459d6275cdad67c03dbcbf89318a2d04d5baaa7
|
data/lib/trenni/template.rb
CHANGED
@@ -24,6 +24,17 @@ module Trenni
|
|
24
24
|
# The output variable that will be used in templates:
|
25
25
|
OUT = :_out
|
26
26
|
|
27
|
+
class Builder
|
28
|
+
def >> block
|
29
|
+
if block
|
30
|
+
Template.buffer(block.binding) << self
|
31
|
+
return nil
|
32
|
+
else
|
33
|
+
return self
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
27
38
|
class Template
|
28
39
|
# Returns the output produced by calling the given block.
|
29
40
|
def self.capture(*args, &block)
|
data/lib/trenni/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trenni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.5.
|
144
|
+
rubygems_version: 2.5.2
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: A fast native templating system that compiles directly to Ruby code.
|