manufacturable 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/manufacturable/dispatcher.rb +20 -0
- data/lib/manufacturable/version.rb +1 -1
- data/lib/manufacturable.rb +1 -0
- data/manufacturable.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e0bee5e73591bee5d9bbcdb20761596facb07dbf15f6fedb61a2af2d2baf78
|
4
|
+
data.tar.gz: b83684b6cf6bde99726921e683597cdf06a622ac0662509f433f5d53cf848824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fcaa04eb2f22748b66a3755d3d1d739f77aa0a5c7e37dbaff2d5d67810c740c8b4f73b09565fe60b054ed4d25d12d8e7b75406c435ff73002b0b456c76e0f3f
|
7
|
+
data.tar.gz: 3430e40a0395c0ee22b67e5ae1fe9180c062eebe37a08bd6a2628f3c110e45d10cf1cf46225fd4a418653d787ea38e0069801fe76ce7a5c1d0171f0bce727763
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Manufacturable
|
2
|
+
class Dispatcher
|
3
|
+
attr_reader :message, :receiver
|
4
|
+
|
5
|
+
def initialize(message:, receiver:)
|
6
|
+
@message = message
|
7
|
+
@receiver = receiver
|
8
|
+
end
|
9
|
+
|
10
|
+
def method_missing(name, *args, **kwargs)
|
11
|
+
return super unless respond_to?(name)
|
12
|
+
|
13
|
+
Manufacturable.build_one(receiver, name, *args, **kwargs).public_send(message)
|
14
|
+
end
|
15
|
+
|
16
|
+
def respond_to_missing?(name, include_private = false)
|
17
|
+
Manufacturable.builds?(receiver, name) || super
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/manufacturable.rb
CHANGED
data/manufacturable.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
14
|
|
15
|
-
|
15
|
+
spec.metadata = {
|
16
16
|
"bug_tracker_uri" => "https://github.com/first-try-software/manufacturable/issues",
|
17
17
|
"homepage_uri" => spec.homepage,
|
18
18
|
"source_code_uri" => "https://github.com/first-try-software/manufacturable"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manufacturable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Ridlehoover
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-04-
|
12
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- lib/manufacturable.rb
|
107
107
|
- lib/manufacturable/builder.rb
|
108
108
|
- lib/manufacturable/config.rb
|
109
|
+
- lib/manufacturable/dispatcher.rb
|
109
110
|
- lib/manufacturable/factory.rb
|
110
111
|
- lib/manufacturable/injector.rb
|
111
112
|
- lib/manufacturable/item.rb
|