arbitrium 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/arbitrium/file_creator.rb +2 -5
- data/lib/arbitrium/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: 86519c383cfded8f29faf1d9b32410bbf292f49f
|
4
|
+
data.tar.gz: fc6c82185ddd69eb8b7153f5835c8fa7f4dbcb34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 679166fc387b8bc1418c739c444fcaa776f598d4a957228d922ad3c714294567bb34d63e35643f6a24449872dde7f7b48a3b141bcdb09dfd85e810d1b96f63fb
|
7
|
+
data.tar.gz: 3c326ed172dc340dc21339bbfd820ea8955aec8d4315a7c3aa831ce185c5a03713020faa7cdd6efa7b01ac2f4ba1696457e56c74d18496046528604de944ab05
|
data/README.md
CHANGED
@@ -22,13 +22,14 @@ Or install it yourself as:
|
|
22
22
|
#### There are two different uses for this gem.
|
23
23
|
##### Command Line File/Class Creator
|
24
24
|
|
25
|
-
Once you have the gem installed type `
|
25
|
+
Once you have the gem installed type `arbitrium -h` to see the different options.
|
26
26
|
|
27
27
|
Example Usage:
|
28
28
|
```
|
29
|
-
|
29
|
+
arbitrium -f place/where/I/want/file.rb -m run -a Fake,Name
|
30
30
|
# Results in the following file being created: [link.to.file]
|
31
|
-
|
31
|
+
|
32
|
+
arbitrium -f place/where/I/want/file.rb
|
32
33
|
# Results in the following file being created: [link.to.file]
|
33
34
|
```
|
34
35
|
|
@@ -6,9 +6,6 @@ module Arbitrium
|
|
6
6
|
new(options).perform
|
7
7
|
end
|
8
8
|
|
9
|
-
options = { pwd: Dir.pwd, file: nil, method_name: 'perform', module_array: [] }
|
10
|
-
|
11
|
-
|
12
9
|
def initialize(options)
|
13
10
|
@file_with_path = options[:file]
|
14
11
|
@method_name = options[:method_name]
|
@@ -41,7 +38,7 @@ module Arbitrium
|
|
41
38
|
#{add_spaces} end
|
42
39
|
|
43
40
|
#{add_spaces} private
|
44
|
-
#{add_spaces} # define methods from
|
41
|
+
#{add_spaces} # define methods from #{method_name} here
|
45
42
|
#{file_footer}
|
46
43
|
end
|
47
44
|
EOF
|
@@ -68,7 +65,7 @@ module Arbitrium
|
|
68
65
|
end
|
69
66
|
|
70
67
|
def class_header
|
71
|
-
module_array.empty? ? "class #{class_name}" : "
|
68
|
+
module_array.empty? ? "class #{class_name}" : "#{add_spaces(module_array.length)} class #{class_name}"
|
72
69
|
end
|
73
70
|
|
74
71
|
def add_spaces(value = module_array.length)
|
data/lib/arbitrium/version.rb
CHANGED