templater 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/templater.rb +1 -1
- data/lib/templater/actions/template.rb +2 -1
- metadata +2 -2
data/lib/templater.rb
CHANGED
@@ -23,7 +23,8 @@ module Templater
|
|
23
23
|
# === Returns
|
24
24
|
# String:: The rendered template.
|
25
25
|
def render
|
26
|
-
|
26
|
+
context = generator.instance_eval 'binding'
|
27
|
+
ERB.new(::File.read(source), nil, '-').result(context)
|
27
28
|
end
|
28
29
|
|
29
30
|
# Checks if the destination file already exists.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: templater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
@@ -9,7 +9,7 @@ autorequire: templater
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-11 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|