trenni 3.7.0 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5137222fc49006a71dbcc1b9730dba3ff670660df9502bdae43db6d242d25a7
4
- data.tar.gz: 47494cf08dfb486a74c3efd236419f02638f3bd1b593446acd1f26fbd1d87870
3
+ metadata.gz: bb22a2b02952dede7a6391822f677caa17c2120e1dd0a291caba277b4484154f
4
+ data.tar.gz: 64f2a8d5337cdf9ec7bd0a674f6631f355eb4c4799eed16425579588ce81bf0b
5
5
  SHA512:
6
- metadata.gz: 501b5b7fc01eb1da1650c4d32dc296998b428b0919f904b195da5b2f2c53ccd40fcf2bad16f43291d833293987e5fda43adfbdfc21834f97273ee2e460575622
7
- data.tar.gz: 9e7f6a39cf968a59a553c4209644c50a1b69cde60cb99abf437ad662395f9c4e488fa6d20aefdf61c29e0aec90ca879cdbf29c7fe19e90b9cf8ff4eb9d7274f4
6
+ metadata.gz: c470338954b3fb70b631f3d2d8481ed9a74c93b2649f41415c21178473ed9843f31b3d3e75e69084119b48dc8baffca3efb32165757b00b39469e81bdbab5672
7
+ data.tar.gz: 5c9764c889fafa76831454d23322635d7e458d5a73517ea1a98c93ff8cdb033f93265881c68fccf52ef12fce21de5026c2f50038827f356580b6b1b1f4399e99
@@ -24,6 +24,7 @@ require_relative 'markup'
24
24
  module Trenni
25
25
  # The output variable that will be used in templates:
26
26
  OUT = :_out
27
+ BINDING = binding
27
28
 
28
29
  class Builder
29
30
  def >> block
@@ -94,8 +95,9 @@ module Trenni
94
95
  def self.load_file(path, *args)
95
96
  self.new(FileBuffer.new(path), *args).freeze
96
97
  end
97
-
98
- def initialize(buffer, binding: TOPLEVEL_BINDING)
98
+
99
+ # @param binding [Binding] The binding in which the template is compiled. e.g. `TOPLEVEL_BINDING`.
100
+ def initialize(buffer, binding: BINDING)
99
101
  @buffer = buffer
100
102
  @binding = binding
101
103
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Trenni
22
- VERSION = "3.7.0"
22
+ VERSION = "3.7.1"
23
23
  end
@@ -125,7 +125,7 @@ RSpec.describe Trenni::Template do
125
125
  buffer = Trenni::Buffer.new('#{Module.nesting.inspect}')
126
126
  template = Trenni::Template.new(buffer)
127
127
 
128
- expect(template.to_string(self)).to be == "[]"
128
+ expect(template.to_string(self)).to be == "[Trenni]"
129
129
  end
130
130
  end
131
131
  end
@@ -160,4 +160,4 @@ if defined? Trenni::Native
160
160
  RSpec.describe Trenni::Native do
161
161
  it_behaves_like "template parser"
162
162
  end
163
- end
163
+ 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: 3.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-19 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler