structure 0.25.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/structure.rb +4 -0
- data/lib/structure/version.rb +1 -1
- data/test/structure_test.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12c6920942010f99e7c1e26fed12d0cd07d28788
|
4
|
+
data.tar.gz: 67f298813aa7f59d7e4e7c737363f82f6d4ac180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c90c4ad394683b5d8f4e425b0024b5ba2ef6d8664f76ba5e266987b91010ac0c6d18d8bc1f0c587c5b0a446ee9b076029d2e1e1ce9acef51872cae175cd25021
|
7
|
+
data.tar.gz: 1148c4a09f718b4441a1a3f8c4a072f4c1f4edd18dfec79676d9022874a41d2be4495cebe6d6ae4214733ba9fadc780212c92e46b05c6650a5676f351c41693a
|
data/lib/structure.rb
CHANGED
data/lib/structure/version.rb
CHANGED
data/test/structure_test.rb
CHANGED
@@ -48,4 +48,13 @@ class StructureTest < MiniTest::Test
|
|
48
48
|
assert_equal '#<Location latitude=10, longitude=100>', @location.inspect
|
49
49
|
assert_equal @location.to_s, @location.inspect
|
50
50
|
end
|
51
|
+
|
52
|
+
def test_subclasses
|
53
|
+
subclass = Class.new(Location) do
|
54
|
+
value(:name) { 'foo' }
|
55
|
+
end
|
56
|
+
obj = subclass.new(lat: 10, lng: 100)
|
57
|
+
|
58
|
+
assert_equal({ latitude: 10, longitude: 100, name: 'foo' }, obj.values)
|
59
|
+
end
|
51
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hakan Ensari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|