clactive 0.0.10 → 0.0.11

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/clactive.rb +8 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c45e6837315a83c330a436ecd9dab172c90a271
4
- data.tar.gz: 4e8b87f29682dd56faa2f5f08e8eda9e55ec9717
3
+ metadata.gz: ec004dbe7968f7644cd600fc83a3dd6e3b9a4194
4
+ data.tar.gz: c804b6da4821034579f62c5633eada3d50b79821
5
5
  SHA512:
6
- metadata.gz: 100d62d9d29a71d52e3756a1b2df1ad2daad31d5b2eb8babe70cd963227f28c590158d77e3344cb2a8563efee7e383f87b2981ef6c372b5fb14d5ec2f8f8fd31
7
- data.tar.gz: 7f6e25ce00bee1a8f4aa3655f38b5a8c6f9a4a0ba4ec1a92a5a37ce409091d9b29ec1da99d5edca6d2debd80918c73681e59fbfa7a8610e1ab9ef9f4aad0a9be
6
+ metadata.gz: d2b455692aa0c2bd07ddec723f1bed2717a6251707b4468f4912439910fdf0b4c96c1e3ffd2ce20b0f1695219ad321c0909d3ee48332bed11e00260d0a629209
7
+ data.tar.gz: 87666e0acc3f7fc60c88e7c1ce7457582fcdac7598407bd1480759cb208d76756cc92ac4ef3860e7e72d0aa7ef50a3171b3b2a904ab988881f299c9cd5ab947d
data/lib/clactive.rb CHANGED
@@ -97,6 +97,14 @@ module CLActive
97
97
  @parser.on(*argv) do |val|
98
98
  @usropts[key] = val
99
99
  end
100
+
101
+ meth = key.to_s + '?'
102
+ if meth.to_sym.inspect !~ /[@$"]/ && !respond_to?(meth, true)
103
+ eigen = class << self; self end
104
+ eigen.send(:define_method, meth) do
105
+ @usropts[key]
106
+ end
107
+ end
100
108
  end
101
109
  end
102
110
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clactive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tang Tianyong