mcli 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mcli.rb +1 -1
- data/lib/mcli/command.rb +4 -0
- data/lib/mcli/command_group.rb +8 -0
- data/lib/mcli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46a66749c3036b67941be0bd467f468a50bed5c65bf6339fa38e4f6860ae1576
|
4
|
+
data.tar.gz: ee8160680bd44f9e119b5703ac336e5794996ae86e75882e5c16209e524b3530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aff53ff9cb2ac7cb05f984348851e6697cdba511fd3580be155d3fff4c3fc532569d18d8f6193634d6c11876938f5ecafea2605e98c2eaf62d171358febd261
|
7
|
+
data.tar.gz: a1523561c64404be6211ef640f667fb8932d9e31eb50fff3f06fddf8a9c0134dff1c7066d6dae681ec074596ce49769e909ed325e77dc682b75bc5aa236a7e51
|
data/lib/mcli.rb
CHANGED
data/lib/mcli/command.rb
CHANGED
data/lib/mcli/command_group.rb
CHANGED
@@ -4,6 +4,10 @@ class MCLI::CommandGroup
|
|
4
4
|
commands[command_name] = command_klass
|
5
5
|
end
|
6
6
|
|
7
|
+
def register_root(command_klass)
|
8
|
+
@root_command = command_klass
|
9
|
+
end
|
10
|
+
|
7
11
|
def commands
|
8
12
|
@commands ||= {}
|
9
13
|
end
|
@@ -11,6 +15,10 @@ class MCLI::CommandGroup
|
|
11
15
|
def clear
|
12
16
|
@commands = {}
|
13
17
|
end
|
18
|
+
|
19
|
+
def root_command
|
20
|
+
@root_command
|
21
|
+
end
|
14
22
|
end
|
15
23
|
end
|
16
24
|
|
data/lib/mcli/version.rb
CHANGED