rasti-db 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rasti/db/model.rb +5 -1
- data/lib/rasti/db/version.rb +1 -1
- 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: c80d9d9eadee5892e6875e7654a5b2c4810bf3eb
|
4
|
+
data.tar.gz: 98e644bf49e22e0058cc89942ad9a97b7daeee6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0476caf5b11d900690e236f417588f9e3baf1727f54a4defe274e43d34b67043fcb5b93e5d404f6ee8b111c91e438a41378f23c2f563db0b22c2a8d8c6fa54d5
|
7
|
+
data.tar.gz: 5d6d0c017703afc6b232c517e5baf80a229fac38536e43f30e2efb37da55ec39a8270259ad4b6fa644e56a62ef4a1c6c52ed9a5825c36c2776143818a6591b4b
|
data/lib/rasti/db/model.rb
CHANGED
@@ -48,7 +48,7 @@ module Rasti
|
|
48
48
|
attributes << name
|
49
49
|
|
50
50
|
define_method name do
|
51
|
-
|
51
|
+
fetch_attribute name
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -99,6 +99,10 @@ module Rasti
|
|
99
99
|
private
|
100
100
|
|
101
101
|
attr_reader :attributes
|
102
|
+
|
103
|
+
def fetch_attribute(name)
|
104
|
+
attributes.key?(name) ? attributes[name] : raise(UninitializedAttributeError, name)
|
105
|
+
end
|
102
106
|
|
103
107
|
end
|
104
108
|
end
|
data/lib/rasti/db/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasti-db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|