Sha256: 43ea90510f66679efa9a1b44aa6f8c416d59adc6fb40983eacc5da137af9742f

Contents?: true

Size: 509 Bytes

Versions: 34

Compression:

Stored size: 509 Bytes

Contents

module RR
  module ClassInstanceMethodDefined
    def class_instance_method_defined(klass, instance_method, include_super=true)
      klass.instance_methods(include_super).detect {|method_name| method_name.to_sym == instance_method.to_sym} ||
        klass.protected_instance_methods(include_super).detect {|method_name| method_name.to_sym == instance_method.to_sym} ||
        klass.private_instance_methods(include_super).detect {|method_name| method_name.to_sym == instance_method.to_sym}
    end
  end
end

Version data entries

34 entries across 30 versions & 5 rubygems

Version Path
rr-1.2.1 lib/rr/class_instance_method_defined.rb
rr-1.2.0 lib/rr/class_instance_method_defined.rb
rr-1.1.2 lib/rr/class_instance_method_defined.rb
rr-1.1.2.rc1 lib/rr/class_instance_method_defined.rb
rr-1.1.1 lib/rr/class_instance_method_defined.rb
rr-1.1.1.rc1 lib/rr/class_instance_method_defined.rb
rr-1.1.0 lib/rr/class_instance_method_defined.rb
rr-1.1.0.rc3 lib/rr/class_instance_method_defined.rb
rr-1.1.0.rc2 lib/rr/class_instance_method_defined.rb
rr-1.1.0.rc1 lib/rr/class_instance_method_defined.rb
rr-1.0.5 lib/rr/class_instance_method_defined.rb
rr-1.0.5.rc2 lib/rr/class_instance_method_defined.rb
rr-1.0.5.rc1 lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.2 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb
bitclust-core-0.5.1 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/class_instance_method_defined.rb