ruth 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ruth/gemfile.rb +18 -3
- data/lib/ruth/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: feab1c50c9941379b158c905ed05bc1cd7e228a6
|
4
|
+
data.tar.gz: 9979dd40738bbc533baffbfdf5f75b975a383e9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 931c5c1dc17965a97d630139b13678e685974dd74ecbc66660d7756e5aa2d5c731a865507c825d58287cbc60d66e4d52de1b0981bbf9c0fe8b7e75498fd5a7dd
|
7
|
+
data.tar.gz: 3717ed574a41fe59a87c4a379814380b8ea423902243d0b289ad852f42b3f6706ff4ed44e58694efaf79670094ebe2022a250fe04bcf02c6fbb710d5b99de2c0
|
data/lib/ruth/gemfile.rb
CHANGED
@@ -4,15 +4,30 @@ module Ruth
|
|
4
4
|
class Gemfile
|
5
5
|
attr_accessor :conf, :output
|
6
6
|
|
7
|
-
def initialize
|
8
|
-
@conf = conf
|
7
|
+
def initialize
|
9
8
|
@output = []
|
10
9
|
end
|
11
10
|
|
11
|
+
# Public - Set @conf with filled YAML data
|
12
|
+
#
|
13
|
+
# conf - Array YAML list
|
14
|
+
#
|
15
|
+
# Returns nil
|
16
|
+
def set_conf(conf)
|
17
|
+
@conf = conf
|
18
|
+
end
|
19
|
+
|
12
20
|
# Public - Generate Gemfile
|
13
21
|
#
|
14
22
|
# Returns Array
|
15
|
-
def generate
|
23
|
+
def generate(conf = nil)
|
24
|
+
|
25
|
+
if @conf.nil?
|
26
|
+
fail "Please use set_conf() method or provide conf for generate()"
|
27
|
+
else
|
28
|
+
@conf = conf
|
29
|
+
end
|
30
|
+
|
16
31
|
iterate
|
17
32
|
@output
|
18
33
|
end
|
data/lib/ruth/version.rb
CHANGED