iniparse 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/iniparse.gemspec +1 -1
- data/lib/iniparse.rb +1 -1
- data/lib/iniparse/document.rb +8 -0
- 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: a760f778637f95470f11c04adaa34df3aac8052f
|
4
|
+
data.tar.gz: 287f0dd450e28ed5a71ca780edd5e1b75ced7e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce1e0abf2a913b06d1d2251dc46b8187ac94e4da048deb1f81060c22e7b01b1415b15172435e58dae5bd0d84a41371e11ca73d165a9ab53754e9f89735474020
|
7
|
+
data.tar.gz: 622d4222238d0918c47c40f683df31e9bc3bd10751198e7da429a23feef7f4d2ad38ca12811a6d431b948a8aa5973172b86f0f2338a410f5775f95b40f6376db
|
data/iniparse.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
## If your rubyforge_project name is different, then edit it and comment out
|
13
13
|
## the sub! line in the Rakefile
|
14
14
|
s.name = 'iniparse'
|
15
|
-
s.version = '1.3.
|
15
|
+
s.version = '1.3.2'
|
16
16
|
s.date = '2014-04-10'
|
17
17
|
s.rubyforge_project = 'iniparse'
|
18
18
|
|
data/lib/iniparse.rb
CHANGED
data/lib/iniparse/document.rb
CHANGED
@@ -49,6 +49,14 @@ module IniParse
|
|
49
49
|
string
|
50
50
|
end
|
51
51
|
|
52
|
+
alias_method :to_s, :to_ini
|
53
|
+
|
54
|
+
# A human-readable version of the document, for debugging.
|
55
|
+
def inspect
|
56
|
+
sections = @lines.select { |l| l.is_a?(IniParse::Lines::Section) }
|
57
|
+
"#<IniParse::Document {#{ sections.map(&:key).join(', ') }}>"
|
58
|
+
end
|
59
|
+
|
52
60
|
# Returns true if a section with the given +key+ exists in this document.
|
53
61
|
def has_section?(key)
|
54
62
|
@lines.has_key?(key.to_s)
|