Last active
June 23, 2018 02:27
-
-
Save makevoid/8bca20659cbc2169ce9d2fc14170f49a to your computer and use it in GitHub Desktop.
ruby module with js-style imports/exports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BAZ = MODULE_EXPORTS.fetch :baz | |
module Foo | |
bar = -> { | |
baz = BAZ | |
baz.() | |
} | |
BAR = bar | |
end | |
MODULE_EXPORTS ||= {} | |
MODULE_EXPORTS.merge!( | |
parse: Foo::BAR | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment