Sha256: fcf2ff256dba6db89e6a32015ce96edc1e7a59a2c138e596dbba60872f80dac6

Contents?: true

Size: 388 Bytes

Versions: 11

Compression:

Stored size: 388 Bytes

Contents

module Kernel
  if RUBY_VERSION < '1.9.0'
    # it would be defined if RUBY_VERSION < '1.9.0', see rdoc in ruby 1.9
    def define_singleton_method msg, &block
      self.class.__send__ :define_method, msg, &block
    end
  end
  # it simply alias singleton(instance) method
  def alias_singleton_method new_msg, old_msg
    self.class.__send__ :alias_method, new_msg, old_msg
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ludy-0.1.2 lib/ludy/kernel/singleton_method.rb
ludy-0.1.0 lib/ludy/kernel/singleton_method.rb
ludy-0.1.1 lib/ludy/kernel/singleton_method.rb
ludy-0.1.10 lib/ludy/kernel/singleton_method.rb
ludy-0.1.7 lib/ludy/kernel/singleton_method.rb
ludy-0.1.8 lib/ludy/kernel/singleton_method.rb
ludy-0.1.3 lib/ludy/kernel/singleton_method.rb
ludy-0.1.4 lib/ludy/kernel/singleton_method.rb
ludy-0.1.6 lib/ludy/kernel/singleton_method.rb
ludy-0.1.9 lib/ludy/kernel/singleton_method.rb
ludy-0.1.5 lib/ludy/kernel/singleton_method.rb