attributor-flatpack 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/attributor/flatpack/config.rb +9 -2
- data/lib/attributor/flatpack/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: d7c83619e69912dac110f8f66981c26904c3613b
|
4
|
+
data.tar.gz: a4379341c151eb0436fffcc3cd77630baa3b2efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 336ef03e6940a442de9300e65ab433a2691f45f54d583329fba22fa146e190bce0e792504815b3ad810eaa179c120ab2d9ec96431b58e3d08c9698d3146a8148
|
7
|
+
data.tar.gz: 523cdd36a4554f3b54caa997e16c57c64459fc29c97341b36073483590d7aa52bfd9e336fb7c2339e973bdf2d685d7baddd8d2d3998c4f282ddd35627e0b859b
|
@@ -26,6 +26,13 @@ module Attributor
|
|
26
26
|
config
|
27
27
|
end
|
28
28
|
|
29
|
+
def self.example(context = nil, **values)
|
30
|
+
example = super
|
31
|
+
# Need the @raw to be set as well, since we're using it in fetch
|
32
|
+
example.instance_variable_set(:@raw, @contents.dup)
|
33
|
+
example
|
34
|
+
end
|
35
|
+
|
29
36
|
def initialize(data = nil)
|
30
37
|
@raw = data
|
31
38
|
@contents = {}
|
@@ -41,12 +48,12 @@ module Attributor
|
|
41
48
|
end
|
42
49
|
|
43
50
|
def define_reader(name)
|
44
|
-
attribute = self.class.keys[name]
|
45
51
|
context = default_context(name)
|
46
52
|
define_singleton_method(name) do
|
47
|
-
get(name,
|
53
|
+
get(name, context: context)
|
48
54
|
end
|
49
55
|
|
56
|
+
attribute = self.class.keys[name]
|
50
57
|
return unless attribute.type == Attributor::Boolean
|
51
58
|
|
52
59
|
define_singleton_method(name.to_s + '?') do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attributor-flatpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dane Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attributor
|