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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6eae364becef17e0a5f913fd94c18434d2bc1d63
4
- data.tar.gz: 691d86bf55c4d67746c75c8c96eb973694b91cbe
3
+ metadata.gz: a760f778637f95470f11c04adaa34df3aac8052f
4
+ data.tar.gz: 287f0dd450e28ed5a71ca780edd5e1b75ced7e32
5
5
  SHA512:
6
- metadata.gz: 2835bd549ef0821242c427addf1ff6240e8d55a89adca6efd8fc4382b3b1ad1780e7d33392705664aa6473908351e585b6ee70f56ea852a4f37b9740939f1750
7
- data.tar.gz: 65d8edc3de306fd2102e41c4b962f4e4d57509032dfc6c33f825a10ca25dd98c7a71145bd75c120dfbd54725ea768cc0339b30987f8969f9f37c5a6e57f45153
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.1'
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
@@ -7,7 +7,7 @@ require File.join(dir, 'lines')
7
7
  require File.join(dir, 'parser')
8
8
 
9
9
  module IniParse
10
- VERSION = '1.3.1'
10
+ VERSION = '1.3.2'
11
11
 
12
12
  # A base class for IniParse errors.
13
13
  class IniParseError < StandardError; end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iniparse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Williams