mini_erb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/mini_erb.rb +1 -3
- data/lib/mini_erb/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: a7ea2f7f7a5f77c5ff4efc3a2733d064a57ba2b3
|
4
|
+
data.tar.gz: 7c621bcb57b6503e652722643b08b350dada8f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be9a6fe299ed165f39aa4fad8d7aa8f809df2b247f6e351fdc5762886196ca3600dc12cda3c7ac0628b367010463e868843622ef87db9a622ee94d91479cbe24
|
7
|
+
data.tar.gz: dc66680e11fc0d552bc863a8300f9f59c86ba1de01593c12c95850ffac2d4b738c142c5b414662a01efe992442bbc0e6ef2f75a17d13286b965b66da2d348bd1
|
data/README.md
CHANGED
@@ -206,7 +206,8 @@ made this gem possible.
|
|
206
206
|
|
207
207
|
The next step is to execute the transpiled code in an environment. This
|
208
208
|
environment is a ruby binding to the virtual location of the code execution.
|
209
|
-
In effect, code is executed
|
209
|
+
In effect, code is executed as if it was placed in the spot where the binding
|
210
|
+
is taken.
|
210
211
|
|
211
212
|
This use of bindings allows access to any variables that may have been defined
|
212
213
|
in that a location and also allows the state of that location to be modified.
|
data/lib/mini_erb.rb
CHANGED
@@ -33,8 +33,6 @@ class MiniErb
|
|
33
33
|
text, code, string = string.partition(/<%.*?%>/m)
|
34
34
|
|
35
35
|
text.sub!(/\A$\r?\n?/, "") if suppress
|
36
|
-
suppress = false
|
37
|
-
|
38
36
|
buffer << "#{@eoutvar}<<#{text.inspect};" unless text.empty?
|
39
37
|
|
40
38
|
unless code.empty?
|
@@ -50,7 +48,7 @@ class MiniErb
|
|
50
48
|
end
|
51
49
|
end
|
52
50
|
|
53
|
-
@eoutvar + "=
|
51
|
+
@eoutvar + "=String.new;" + buffer.join + @eoutvar
|
54
52
|
end
|
55
53
|
|
56
54
|
# Return the mini erb text with embedded Ruby results.
|
data/lib/mini_erb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_erb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PeterCamilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02
|
11
|
+
date: 2019-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|