ztk 1.6.12 → 1.6.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/ztk/template.rb +10 -0
  2. data/lib/ztk/version.rb +1 -1
  3. metadata +3 -3
data/lib/ztk/template.rb CHANGED
@@ -38,6 +38,16 @@ module ZTK
38
38
  render_template(load_template(template), context)
39
39
  end
40
40
 
41
+ # Renders a string to a string.
42
+ #
43
+ # @param [String] template The ERB template to process.
44
+ # @param [Hash] context A hash containing key-pairs, for which the keys are turned into global variables with their respective values.
45
+ #
46
+ # @return [String] The evaulated template content.
47
+ def string(template, context=nil)
48
+ render_template(template, context)
49
+ end
50
+
41
51
  # Renders a "DO NOT EDIT" notice for placement in generated files.
42
52
  #
43
53
  # @param [Hash] options Options hash.
data/lib/ztk/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module ZTK
2
2
 
3
3
  # ZTK Version String
4
- VERSION = "1.6.12"
4
+ VERSION = "1.6.14"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ztk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.12
4
+ version: 1.6.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -275,7 +275,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
275
275
  version: '0'
276
276
  segments:
277
277
  - 0
278
- hash: -2233901632438564983
278
+ hash: -1804662787049214165
279
279
  required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  none: false
281
281
  requirements:
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
284
  version: '0'
285
285
  segments:
286
286
  - 0
287
- hash: -2233901632438564983
287
+ hash: -1804662787049214165
288
288
  requirements: []
289
289
  rubyforge_project:
290
290
  rubygems_version: 1.8.25