goku 0.2.1 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/goku/cli.rb +12 -2
- data/lib/goku/factories/base.rb +1 -1
- data/lib/goku/factories/class.rb +1 -1
- data/lib/goku/factories/method.rb +1 -1
- data/lib/goku/factories/module.rb +1 -1
- data/lib/goku/version.rb +1 -1
- 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: aacb8d1b49ad8d9479b91feb8c4a87590f90788e
|
4
|
+
data.tar.gz: a652393694032fb11062cb42467f504496e507a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7f5250939eef640e7270dabf86fa11c8fe5cdb2bb65a32d93efdf5b2a1aa7635ebd343fc7a5d99721d1903705606cb1084cb75ad5dc6e7a10cd4351daaee371
|
7
|
+
data.tar.gz: a23dd96c3d75a7557be75e1a3f79de501661c7e4a2e0a8dce13c486c15710e285cda0662229c28240522c4cfab5e287634bea884d5cf22171f136c1603835cbe
|
data/lib/goku/cli.rb
CHANGED
@@ -5,10 +5,20 @@ module Goku
|
|
5
5
|
def c(raw_path)
|
6
6
|
path = Goku::Path.new(raw_path)
|
7
7
|
|
8
|
+
modules = path.directories.drop(1).map do |module_name|
|
9
|
+
Goku::Factories::Module.new(module_name)
|
10
|
+
end
|
11
|
+
|
8
12
|
klass = Goku::Factories::Class.new(path.filename)
|
9
|
-
klass.
|
13
|
+
klass.add(Goku::Factories::Method.new("initialize"))
|
14
|
+
|
15
|
+
modules.last.add(klass)
|
16
|
+
|
17
|
+
modules.reverse.each_cons(2) do |submodule, parent_module|
|
18
|
+
parent_module.add(submodule)
|
19
|
+
end
|
10
20
|
|
11
|
-
puts
|
21
|
+
puts modules.first.to_s
|
12
22
|
end
|
13
23
|
|
14
24
|
desc "m PATH", "Create a module"
|
data/lib/goku/factories/base.rb
CHANGED
data/lib/goku/factories/class.rb
CHANGED
data/lib/goku/version.rb
CHANGED