Sha256: d4114a0aa78624b683df8b8139d86cff506e5e60bc2dbe5b448714baf2407034

Contents?: true

Size: 377 Bytes

Versions: 28

Compression:

Stored size: 377 Bytes

Contents

# pluginの定数未定義を握りつぶす
class Module
  module ExtModule
    def const_missing(id)
      if self.name =~ /^ProconBypassMan::Plugin/
        parent_const = Object.const_get("#{self.name}")
        parent_const.const_set(id, Module.new)
        Object.const_get("#{self.name}::#{id}")
      else
        super
      end
    end
  end

  prepend ExtModule
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/ext/module.rb
procon_bypass_man-0.3.11 lib/ext/module.rb
procon_bypass_man-0.3.10 lib/ext/module.rb
procon_bypass_man-0.3.9 lib/ext/module.rb
procon_bypass_man-0.3.8.1 lib/ext/module.rb
procon_bypass_man-0.3.8 lib/ext/module.rb
procon_bypass_man-0.3.7 lib/ext/module.rb
procon_bypass_man-0.3.6 lib/ext/module.rb
procon_bypass_man-0.3.5 lib/ext/module.rb
procon_bypass_man-0.3.4 lib/ext/module.rb
procon_bypass_man-0.3.3.1 lib/ext/module.rb
procon_bypass_man-0.3.3 lib/ext/module.rb
procon_bypass_man-0.3.2 lib/ext/module.rb
procon_bypass_man-0.3.1 lib/ext/module.rb
procon_bypass_man-0.3.0 lib/ext/module.rb
procon_bypass_man-0.2.3 lib/ext/module.rb
procon_bypass_man-0.2.2 lib/ext/module.rb
procon_bypass_man-0.2.1 lib/ext/module.rb
procon_bypass_man-0.2.0 lib/ext/module.rb
procon_bypass_man-0.1.23 lib/ext/module.rb