clactive 0.0.8 → 0.0.9

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: 19619dad88fe77eddc8caf60d14809a2042b03f6
4
- data.tar.gz: 287ee7e94fe43873f922de0f0a20277d4dda6956
3
+ metadata.gz: ed21219debd7e79b79623e363ad894dbe9c49081
4
+ data.tar.gz: ab80594ff4db8f35b77169bada141c11fd8c2d28
5
5
  SHA512:
6
- metadata.gz: c6e8c86622dc32b54fd051751fbd455475949d1eb989696b3ff521cb7dcd0aecf11ef8d206a48301fb5199000c1faa9e90e6cae4f0f5873957ceee69f0f2a829
7
- data.tar.gz: 6ac753f27b47a756ad1a9d6e5100f39f0b213c75e41a43d66bbe883feff350c6933671e8e5758aacdb63c6cb6b09148f4565f4f9720de26c34a82d11cb627ae8
6
+ metadata.gz: b7f381c5661ef163c48f690c169950142c496e87bbcc6b72b8df2050e24f193fe72a60dad72b89ad4485bce274d41d558d1f3a7b71b989726b4f52482226d2c9
7
+ data.tar.gz: 70c3a3cf30f30f25f02f16758f0155a378308aee266d26bef04c73b032041b467f5f1e5eef896b1aa8eca23aead6d9f50b4c57af2fac770ffcbe048b1aa5f2d7
@@ -80,9 +80,10 @@ module CLActive
80
80
  subcmds[key]
81
81
  end
82
82
 
83
- def subcmd(&block)
83
+ def subcmd(key = nil, &block)
84
84
  if block
85
85
  cmd = self.class.new
86
+ cmd.name(key) if key
86
87
  cmd.instance_exec(&block)
87
88
  subcmds[cmd.name] = cmd if cmd.name
88
89
  else
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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tang Tianyong