lazy_lazer 0.7.1 → 0.7.2
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.
- checksums.yaml +4 -4
- data/lib/lazy_lazer.rb +1 -1
- data/lib/lazy_lazer/internal_model.rb +3 -2
- data/lib/lazy_lazer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77feb46739d312dbc726ab9291c19b7d1d585a44
|
4
|
+
data.tar.gz: a9a5ffda84ee0ed882b7944d7a7767e59d8efeb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c4ec41ef8145e740c889200494831016cbb543f3fe1231bc93105a477bedcb765c242abc78f3307fabf8e791692da9a071b1dd991056c552c84ea2a216bffbf
|
7
|
+
data.tar.gz: e067e5cd6cde812fd9731b02ba4a4e5ee98a6a3bd630ae2241ef5d1f35f4d933ab526143b5acb77801deae4e5e5ae16067b9f7f062e12f41e875d3f56085e8ec
|
data/lib/lazy_lazer.rb
CHANGED
@@ -82,7 +82,7 @@ module LazyLazer
|
|
82
82
|
return false if self.class != other.class
|
83
83
|
return super if @_lazer_model.required_properties.empty?
|
84
84
|
@_lazer_model.required_properties.each do |key_name|
|
85
|
-
return false if
|
85
|
+
return false if read_attribute(key_name) != other.read_attribute(key_name)
|
86
86
|
end
|
87
87
|
true
|
88
88
|
end
|
@@ -18,6 +18,7 @@ module LazyLazer
|
|
18
18
|
# Converts all unconverted keys and packages them as a hash.
|
19
19
|
# @return [Hash] the converted hash
|
20
20
|
def to_h
|
21
|
+
return @cache_hash if fully_loaded?
|
21
22
|
todo = @key_metadata.keys - @cache_hash.keys
|
22
23
|
todo.each_with_object(@cache_hash) { |key, cache| cache[key] = load_key_from_source(key) }.dup
|
23
24
|
end
|
@@ -32,8 +33,8 @@ module LazyLazer
|
|
32
33
|
# @param key_name [Symbol] the key to check
|
33
34
|
# @return [Boolean] whether the key exists locally.
|
34
35
|
def exists_locally?(key_name)
|
35
|
-
ensure_metadata_exists(key_name)
|
36
|
-
@source_hash.key?(
|
36
|
+
meta = ensure_metadata_exists(key_name)
|
37
|
+
@source_hash.key?(meta.source_key)
|
37
38
|
end
|
38
39
|
|
39
40
|
# Mark a key as tainted, forcing a reload on the next lookup.
|
data/lib/lazy_lazer/version.rb
CHANGED