dot_why 1.0.0 → 1.0.1

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 +13 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb484d6635749169ca57e8843ba6fdf0b9e2f2f2
4
- data.tar.gz: fbedc608b6ec0c11153f5e30e4b8ab88dec55ee0
3
+ metadata.gz: 39eb8e2e9d1c535efe41ff75c1db523e8d2d2105
4
+ data.tar.gz: 71f1e98fcd52dbebe24278e43808d15b6fc2cb80
5
5
  SHA512:
6
- metadata.gz: 6f04ec75c5f5940db66f5c0e8d1b044b08e31ffe85fa7b9394fbd61f7ce88bcc635d9deb93a9bc4c1c79b6854af36e66cd23f8e065c3cd5b1dd8453aadd559c9
7
- data.tar.gz: 38c7dea6186df569c0c1fb9263b2d613c1d2cd76da76477cdee3747a3a655d91d2cb3a5c72dc66c1be20a08c97cf70e9bbb21de71805b3788e6341f811f3f360
6
+ metadata.gz: b463ed51aca8275ce7057890b56774f1555991f3f435750d1b789921ca24e91befe91f7f58f8bd991ef6e87bc794df20f80dbf34b8eefcec7e300a526a9be7e0
7
+ data.tar.gz: be89a4120da9a7ffe4eea11c6f2b23678b5ccee163065482473949a80fbad7ef20389306031a3671168d22e34d6322d01b3edd49b09842599e75042a6c2be43d
data/lib/dot_why.rb CHANGED
@@ -6,13 +6,8 @@ module Dot_Why
6
6
 
7
7
  class Template < Erector::Widget
8
8
 
9
- def initialize raw_file, *args
10
- @file = file = File.expand_path(raw_file).sub(".rb", "") + '.rb'
11
- @_blocks = {}
12
- super(*args)
13
- end
9
+ class << self # ================================================================
14
10
 
15
- class << self
16
11
  def blocks *args
17
12
  args.each do |word|
18
13
  define_method(word.to_sym) do |pos = :bottom, &b|
@@ -20,10 +15,21 @@ module Dot_Why
20
15
  end
21
16
  end
22
17
  end
23
- end
18
+
19
+ end # ==========================================================================
24
20
 
25
21
  blocks :main
26
22
 
23
+ def initialize raw_file, *args
24
+ @file = file = File.expand_path(raw_file).sub(".rb", "") + '.rb'
25
+ @_blocks = {}
26
+ super(*args)
27
+ end
28
+
29
+ def main_file
30
+ @file
31
+ end
32
+
27
33
  def block raw_name, pos = :bottom, *args, &b
28
34
  name = raw_name.to_sym
29
35
  if (b)
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - da99