class Module

pluginの定数を握りつぶす

Public Instance Methods

const_missing(id) click to toggle source
# File lib/procon_bypass_man/web/setting_parser.rb, line 5
def const_missing(id)
  raise(NameError, "uninitialized constant #{id}") unless self.name =~ /^ProconBypassMan/
  eval "module #{self.name}::#{id}; end", Object::TOPLEVEL_BINDING
  eval "#{self.name}::#{id}"
end