tmp 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/examples/test.rb +7 -1
- data/lib/tmp/dsl.rb +5 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1456cbbe0bb30447c73afdca9f8af01405b477
|
4
|
+
data.tar.gz: 3835bb393ee46825c863deafea76cc3414d3b1ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 670b014328b82c5d13d189dfe8c59294acfc6d858b65fc2980882841e67c5b012aeb239db82e2468efd91d7f6440ed2ff78ab0210ab662157d7932359263c416
|
7
|
+
data.tar.gz: 3e63d13b47ad3782ea776b26ab7d916a83d8a1d41f59c99c0975aa4bd815d70a814960a50b68ef4dbd65ccf2a8e8460a9935c73e6b5a5aa323abc07ed5e40fd5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0
|
1
|
+
2.1.0
|
data/examples/test.rb
CHANGED
data/lib/tmp/dsl.rb
CHANGED
@@ -1,15 +1,11 @@
|
|
1
1
|
#encoding: UTF-8
|
2
2
|
module TMP
|
3
3
|
|
4
|
-
|
5
4
|
module DSLCore
|
6
5
|
|
7
6
|
def target_obj obj=nil
|
8
7
|
|
9
|
-
unless obj.nil?
|
10
|
-
@target_obj= obj
|
11
|
-
end
|
12
|
-
|
8
|
+
@target_obj= obj unless obj.nil?
|
13
9
|
@target_obj || ::TMP
|
14
10
|
|
15
11
|
end
|
@@ -18,8 +14,9 @@ module TMP
|
|
18
14
|
|
19
15
|
@target_methods = [:write,:read,:file]
|
20
16
|
|
21
|
-
if method.to_s.
|
22
|
-
target_obj.__send__ @target_methods[0], method.to_s.
|
17
|
+
if method.to_s.reverse[0] == '='
|
18
|
+
target_obj.__send__ @target_methods[0], method.to_s.reverse.sub('=','').reverse, args.first
|
19
|
+
return args.first
|
23
20
|
else
|
24
21
|
|
25
22
|
unless block.nil?
|
@@ -62,8 +59,8 @@ module TMP
|
|
62
59
|
::TMP::DSL
|
63
60
|
end
|
64
61
|
|
65
|
-
alias :temporally :tmp
|
66
62
|
alias :__TMP__ :tmp
|
63
|
+
alias :__tmp__ :tmp
|
67
64
|
|
68
65
|
end
|
69
66
|
|