pluginator 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pluginator/version.rb +1 -1
- data/lib/plugins/pluginator/extensions/first_ask.rb +2 -0
- 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: 3a56ec0232b4b0d3bff76ca136b14b33b0d7b232
|
4
|
+
data.tar.gz: 208b160fb4e716d43afe4ed4abb7ce6fcd5efb92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0551d4d9f432d29e2b36912817f9b4a8a738762b3cf18ba7f1c5eb565894ce9abcfc0b1358d8b5f0f4ed75348e79e61dea0bf0f34e444367fe4926e3c366341
|
7
|
+
data.tar.gz: 3d33a4462c1c6f900470189c73c7dba418809264ba1cf1c45590dd71d08994e5bae676d2984e0df5ad7aa361a7bad319c5ab85fffbab71dc4c22c762d840da3e
|
data/lib/pluginator/version.rb
CHANGED
@@ -15,6 +15,7 @@ module Pluginator::Extensions
|
|
15
15
|
def first_ask(type, method_name, *params)
|
16
16
|
@plugins[type] or return nil
|
17
17
|
@plugins[type].detect do |plugin|
|
18
|
+
plugin.respond_to?(method_name.to_sym) &&
|
18
19
|
plugin.public_send(method_name.to_sym, *params)
|
19
20
|
end
|
20
21
|
end
|
@@ -24,6 +25,7 @@ module Pluginator::Extensions
|
|
24
25
|
def first_ask!(type, method_name, *params)
|
25
26
|
@plugins[type] or raise Pluginator::MissingType.new(type, @plugins.keys)
|
26
27
|
@plugins[type].detect do |plugin|
|
28
|
+
plugin.respond_to?(method_name.to_sym) &&
|
27
29
|
plugin.public_send(method_name, *params)
|
28
30
|
end or
|
29
31
|
raise Pluginator::MissingPlugin.new(type, "first_ask: #{method_name}", plugins_map(type).keys)
|