dot_why 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dot_why.rb +5 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46f5b1b525ac28d6b7ee666075b243792de028a8
4
- data.tar.gz: fe4ad00f977203729ce3465449fb9eb871024b8f
3
+ metadata.gz: eb484d6635749169ca57e8843ba6fdf0b9e2f2f2
4
+ data.tar.gz: fbedc608b6ec0c11153f5e30e4b8ab88dec55ee0
5
5
  SHA512:
6
- metadata.gz: bf9bd5af59f969059ffdbc3147e1a8f9ac405f82ed78175a56e0dc028d25626157555bd4939f1caef603be86c068f7e9174e6516dd0c0431ff6e818ba8a20932
7
- data.tar.gz: 73a60a2e3bc9404e4d9256c6c9ea9b58867ea507475f74ca810237e04b6e46abd862cee09535ac422dd34d04430bf94b47264e0136badb8bc4ed1bc8cc0fa07c
6
+ metadata.gz: 6f04ec75c5f5940db66f5c0e8d1b044b08e31ffe85fa7b9394fbd61f7ce88bcc635d9deb93a9bc4c1c79b6854af36e66cd23f8e065c3cd5b1dd8453aadd559c9
7
+ data.tar.gz: 38c7dea6186df569c0c1fb9263b2d613c1d2cd76da76477cdee3747a3a655d91d2cb3a5c72dc66c1be20a08c97cf70e9bbb21de71805b3788e6341f811f3f360
data/lib/dot_why.rb CHANGED
@@ -7,10 +7,9 @@ module Dot_Why
7
7
  class Template < Erector::Widget
8
8
 
9
9
  def initialize raw_file, *args
10
- file = File.expand_path(raw_file).sub(".rb", "") + '.rb'
10
+ @file = file = File.expand_path(raw_file).sub(".rb", "") + '.rb'
11
11
  @_blocks = {}
12
12
  super(*args)
13
- eval(File.read("#{file}"), nil, file, 1)
14
13
  end
15
14
 
16
15
  class << self
@@ -57,6 +56,10 @@ module Dot_Why
57
56
  end
58
57
  end
59
58
 
59
+ def eval_main
60
+ eval(File.read("#{@file}"), nil, @file, 1)
61
+ end
62
+
60
63
  def content
61
64
  main
62
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dot_why
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - da99
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  requirements: []
72
72
  rubyforge_project:
73
- rubygems_version: 2.0.6
73
+ rubygems_version: 2.0.7
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Erector to create other templates.