modulation 0.14 → 0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/modulation/builder.rb +1 -0
- data/lib/modulation/ext.rb +3 -1
- data/lib/modulation/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48d5edc681b84cf2e1c5774961f96c4e544ac0af84bbc5343e90f0fc4b1169d2
|
4
|
+
data.tar.gz: ac8f8ed76ae68a98dae475b9eaba677208688120dd15f4429a4d82024469409b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1028fbba22d36fad82cc003d6958d1302479fddceafc3937f4154e81fad81ed944f487d9f44fe3afa66e4099ea73c3f5a42e73fabc5ff5ae6ef99acfe4ca7d0
|
7
|
+
data.tar.gz: 7c4281980fed04ed041da843fded0e555e2d00b35b7f3feb28ef3ea5ac266821b9a007212a02dbab6e67fc6adce583607a2f6b4f1e0830c17b6a530c7b896547
|
data/CHANGELOG.md
CHANGED
data/lib/modulation/builder.rb
CHANGED
@@ -50,6 +50,7 @@ module Modulation
|
|
50
50
|
# @param symbols [Array] array of exported symbols
|
51
51
|
# @return [void]
|
52
52
|
def set_exported_symbols(mod, symbols)
|
53
|
+
mod.__module_info[:exported_symbols] = symbols
|
53
54
|
singleton = mod.singleton_class
|
54
55
|
|
55
56
|
singleton.instance_methods(false).each do |sym|
|
data/lib/modulation/ext.rb
CHANGED
@@ -34,12 +34,14 @@ class Module
|
|
34
34
|
# @return [void]
|
35
35
|
def include_from(path)
|
36
36
|
mod = import(path, caller(1..1).first)
|
37
|
+
exported_symbols = mod.__module_info[:exported_symbols]
|
38
|
+
|
37
39
|
mod.singleton_class.instance_methods(false).each do |sym|
|
38
|
-
next if sym == :MODULE
|
39
40
|
send(:define_method, sym, &mod.method(sym))
|
40
41
|
end
|
41
42
|
|
42
43
|
mod.singleton_class.constants(false).each do |sym|
|
44
|
+
next unless exported_symbols.include?(sym)
|
43
45
|
const_set(sym, mod.singleton_class.const_get(sym))
|
44
46
|
end
|
45
47
|
end
|
data/lib/modulation/version.rb
CHANGED