structure 0.7.0 → 0.7.1

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.
data/README.md CHANGED
@@ -56,7 +56,7 @@ Typecast:
56
56
  p1.age
57
57
  => 28
58
58
 
59
- Use AR-like association idioms:
59
+ Embed other structures:
60
60
 
61
61
  p2 = Person.new
62
62
  p1.friends << p2
data/lib/structure.rb CHANGED
@@ -1,14 +1,16 @@
1
+ require 'uri'
2
+
3
+ # Ruby doesn't have a Boolean class, so let's feign one.
4
+ unless Object.const_defined?(:Boolean)
5
+ module Boolean; end
6
+ class TrueClass; include Boolean; end
7
+ class FalseClass; include Boolean; end
8
+ end
9
+
1
10
  # A Struct-like data container.
2
11
  class Structure
3
12
  include Enumerable
4
13
 
5
- # Ruby doesn't have a Boolean class, so let's feign one.
6
- unless Object.const_defined?(:Boolean)
7
- module ::Boolean; end
8
- class ::TrueClass; include Boolean; end
9
- class ::FalseClass; include Boolean; end
10
- end
11
-
12
14
  TYPES = [Array, Boolean, Float, Hash, Integer, String, Structure, URI]
13
15
 
14
16
  class << self
@@ -1,3 +1,3 @@
1
1
  class Structure
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 0
9
- version: 0.7.0
8
+ - 1
9
+ version: 0.7.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paper Cavalier