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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f978da77175a9071cf75459ecc67b76c46611a5
4
- data.tar.gz: 69e8b067fdee4bcd19fcc9380c58c7e905571e9f
3
+ metadata.gz: a3542181e14f5fed337b838c2ade044b487f9f65
4
+ data.tar.gz: b440daa0411f50da581a02c77f163a74a007a1b4
5
5
  SHA512:
6
- metadata.gz: 061165c578720fe3647d7290a1dfc293826a3366f22ad4d4ea52596ede57398535b29734cc5da009a540ae21059e7f226df8c93d0cb37d4ca8870194e64e0361
7
- data.tar.gz: e7c2baa36ea1f88c9b16ccbccc26639c454ca3e5e812e20c7e6505b55a97043e592e46efb455a71b7b2156a7e837916f8948d307a0535a9b11ab794407d77ddf
6
+ metadata.gz: ee9347b54904e93f91d2153bbee549895763e16a1de8f0ed2d45e1fd54461a49fdb96d678c5de330fbf75a1b4417bff5bbddc865f6fc0734acd4e383d25c204c
7
+ data.tar.gz: 67a322f46cde72f4e629f56c8988a3db6b82d75c146e2e6ce92ecb5cdba3e0c54b16651ca6934871377d8daef459d6275cdad67c03dbcbf89318a2d04d5baaa7
@@ -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)
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Trenni
22
- VERSION = "2.0.2"
22
+ VERSION = "2.1.0"
23
23
  end
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.2
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: 2016-11-29 00:00:00.000000000 Z
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.1
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.