activeyaml 0.1.6 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_yaml/method_redirection.rb +1 -1
- data/lib/active_yaml/version.rb +1 -1
- data/lib/active_yaml/yaml_hash.rb +3 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b59e3eca883ff3ce07f8e5f6f5d1ddf3a2a10331987854a9c4137071573d684c
|
4
|
+
data.tar.gz: 80cc1a3fead0e93411a419633d5985eaaeda9eef88963695b05653ed105fee82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5f0a3fa1e8dbb9d6446fdddd1da28c091287bf034db6b7bb507afe1f93fab4352279ed186895340272438ed83374e4339ac1f2e9ca8a78bcd6fbd8cea127524
|
7
|
+
data.tar.gz: 312629be17b050c0ddc705a927f58ea8ae56a0fa67b84ffb876284fcf59704e05d1fa895202e9c8f3bb51510d417de8fdc73be64d454479035bd1e014e83bb39
|
@@ -6,7 +6,7 @@ module ActiveYaml
|
|
6
6
|
# A module with methods for implementing tracking methods.
|
7
7
|
# In the model in order to proxy them into a hash with YML data
|
8
8
|
module MethodRedirection
|
9
|
-
def method_missing(method, *args, &
|
9
|
+
def method_missing(method, *args, &)
|
10
10
|
value = yaml_data[method.to_s]
|
11
11
|
|
12
12
|
if value
|
data/lib/active_yaml/version.rb
CHANGED
@@ -3,11 +3,13 @@
|
|
3
3
|
module ActiveYaml
|
4
4
|
# Class for creating hashes of similar objects
|
5
5
|
class YamlHash
|
6
|
+
attr_reader :hash
|
7
|
+
|
6
8
|
def initialize(hash)
|
7
9
|
@hash = hash || {}
|
8
10
|
end
|
9
11
|
|
10
|
-
def method_missing(method, *args, &
|
12
|
+
def method_missing(method, *args, &)
|
11
13
|
value = hash[method.to_s]
|
12
14
|
|
13
15
|
if value
|
@@ -30,9 +32,5 @@ module ActiveYaml
|
|
30
32
|
def respond_to_missing?(method, include_private = false)
|
31
33
|
hash.key?(method.to_s) || super
|
32
34
|
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
attr_reader :hash
|
37
35
|
end
|
38
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeyaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Leonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: psych
|