clactive 0.0.3 → 0.0.4

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 +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14d3c4787fcbf2b6b3fd2d467d8b92301d46290d
4
- data.tar.gz: a7be64a6d1aea972456bfbc4cf3e695dc1745479
3
+ metadata.gz: a61cf63a468c524f1aaf045855af2f323bdee6db
4
+ data.tar.gz: 69349d247b600913285edd93c6abad76b765b101
5
5
  SHA512:
6
- metadata.gz: d4d865ceb9d0c4066936fd5013b821dbe3a1119413b94c6cdde06152b572278db5a6f0d80402ef7689eeece568bba89ec20aef69c32e3f5e844fafe4d8893810
7
- data.tar.gz: 868342f3e6902b397ba2092dab7eeb0897c1d721bb67493590db3bc4bfdfc10001bb4f4ff8d9961ff7b25354f8fe3736f10e93e7dab59fbc6b68371730d36dff
6
+ metadata.gz: fb492c9be1bc1edffbf8bc1dffc6a54b51bcaf70ed1a6318a126069f82b04bf5ae7e32a241dff1c3256c1e165fbdf8bdc7dd019c4cd04b8602c6d08abd1c471a
7
+ data.tar.gz: ba46ec8c3e74b0349828bac1ba320d16865ab4ef35ee77246950e575e394ead7b867341da16dab10a0b5f2a6779e22fc7161946bd9ca39cc1fb80eeab984c582
data/lib/clactive.rb CHANGED
@@ -90,10 +90,11 @@ module CLActive
90
90
  end
91
91
 
92
92
  delegate = klass_delegate.new
93
+ eigen = class << self; self end
93
94
 
94
95
  self.instance_eval do
95
96
  [:subcmd, :option, :action].each do |api|
96
- define_singleton_method api do |*args, &block|
97
+ eigen.send(:define_method, api) do |*args, &block|
97
98
  delegate.cmd.send(api, *args, &block)
98
99
  end
99
100
  end
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tang Tianyong