libis-tools 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libis/tools/config.rb +2 -2
- data/lib/libis/tools/config_file.rb +3 -3
- data/lib/libis/tools/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: abe45e9ce73f0da4087c1cbfe554a9d8d62680c9
|
4
|
+
data.tar.gz: 845d2bbee0b78df26160501a4a15bb532ac62e1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afa5e9bfd7b2ea4c908046159b718e70868fa3160559f5ebe350c5e81bf7d601dae1f7aa168cea4f914249e561fbdb627e3d67a9db19ce4b3e3fbd6e104ab4a0
|
7
|
+
data.tar.gz: d1f52ac47989cc3bfe353d14b15ef581c3121826a06fb1c9e240364c03a291a5ec64c66da656c9bc1c4de0825f2593f92053cdac6bdee58e7e565a75bb8c18ca
|
data/lib/libis/tools/config.rb
CHANGED
@@ -33,8 +33,8 @@ module Libis
|
|
33
33
|
# passed to the {#<<} method after initialization.
|
34
34
|
#
|
35
35
|
# @param [String,Hash] file_or_hash optional String or Hash argument to initialize the data.
|
36
|
-
def initialize(file_or_hash = nil)
|
37
|
-
super
|
36
|
+
def initialize(file_or_hash = nil, opt = {})
|
37
|
+
super({}, opt)
|
38
38
|
self << file_or_hash
|
39
39
|
end
|
40
40
|
|
@@ -48,7 +48,7 @@ module Libis
|
|
48
48
|
#
|
49
49
|
# @param [String,Hash] file_or_hash optional String or Hash argument to initialize the data.
|
50
50
|
def <<(file_or_hash)
|
51
|
-
return self if file_or_hash.nil?
|
51
|
+
return self if file_or_hash.nil? || (file_or_hash.respond_to?(:empty?) && file_or_hash.empty?)
|
52
52
|
hash = case file_or_hash
|
53
53
|
when Hash
|
54
54
|
yield file_or_hash if block_given?
|
data/lib/libis/tools/version.rb
CHANGED