Sha256: 0c4e10caeab9955a3626755daa5e1175a0e5d093f53cf894bca782062f3d1109

Contents?: true

Size: 277 Bytes

Versions: 13

Compression:

Stored size: 277 Bytes

Contents

class Module #:nodoc:

    # This is here just to be able to call this method on all constants
    def subclass_of?(klass)
        return false
    end
    
    def parent_module(n=1)
        return const_get_full(self.to_s.reverse.split('::', n+1)[n].reverse)
    end
    
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spiderfw-0.5.13 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.12 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.11 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.10 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.9 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.7 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.6 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.5 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.4 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.3 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.2 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5.1 lib/spiderfw/utils/monkey/module.rb
spiderfw-0.5 lib/spiderfw/utils/monkey/module.rb