Skip to content

Instantly share code, notes, and snippets.

@makevoid
Last active June 23, 2018 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makevoid/8bca20659cbc2169ce9d2fc14170f49a to your computer and use it in GitHub Desktop.
Save makevoid/8bca20659cbc2169ce9d2fc14170f49a to your computer and use it in GitHub Desktop.
ruby module with js-style imports/exports
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