class Exports

Public Instance Methods

functions() click to toggle source
# File lib/exports.rb, line 12
def functions
  @functions ||= {}
end
import(*keys) click to toggle source
# File lib/exports.rb, line 8
def import(*keys)
  keys.map { |k| functions[k] }
end
method_missing(name, function) click to toggle source
# File lib/exports.rb, line 2
def method_missing(name, function)
  return unless name.to_s.end_with?('=')
  name = name[0..-2].to_sym
  functions[name] = function
end