interactor-clearcontext 0.1.10 → 0.1.11
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b6f60b12abb603606c6f0f0be3588c7d0f4a9ed2e3f98d456b0c3b4b4a9a57b
|
|
4
|
+
data.tar.gz: f39f31bcde41dafb476c34f0edfc723f6d19bc4a59609060741c86ccde6d7673
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7174b8ec2409d7d26f1a1bc6047e3234932fa97764265c900baea6ae11b46e1df399346cca535461426a0634cc383cbd7f6ff4f8eaa0f2cc9c7596817852a980
|
|
7
|
+
data.tar.gz: '08ff3c7019eafc794aea64c177d89f76ce067779ee934d61f520106a30619febd2266e6f034714a7418d5cfa3d9b833761efc85b34d4005471c494e6d4ddbbf2'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
module Interactor
|
|
2
2
|
module ClearContext
|
|
3
|
-
|
|
4
3
|
module ContextAccessor
|
|
5
4
|
|
|
6
5
|
def self.included(base)
|
|
@@ -11,20 +10,16 @@ module Interactor
|
|
|
11
10
|
|
|
12
11
|
module ClassMethods
|
|
13
12
|
def self.require_contexts(*attributes)
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
attr_writer attributes
|
|
14
|
+
# define getter
|
|
15
|
+
attributes.each do |attribute|
|
|
16
16
|
define_method attribute do
|
|
17
|
-
context.send
|
|
18
|
-
end
|
|
19
|
-
# define setter
|
|
20
|
-
define_method "#{attribute.to_s}=" do |value|
|
|
21
|
-
context.send "#{attribute.to_s}=", value
|
|
17
|
+
instance_variable_get("@#{attribute}") ||= context.send(attribute)
|
|
22
18
|
end
|
|
23
19
|
end
|
|
24
20
|
end
|
|
25
21
|
end
|
|
26
22
|
|
|
27
23
|
end
|
|
28
|
-
|
|
29
24
|
end
|
|
30
25
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: interactor-clearcontext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- uesaiso
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-10-
|
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|