Class: Module

Inherits:
Object show all
Defined in:
lib/bj/stdext.rb

Constant Summary collapse

Instance_Methods =
instance_method "instance_methods"

Instance Method Summary collapse

Instance Method Details

#instance_methods(&block) ⇒ Object



59
60
61
# File 'lib/bj/stdext.rb', line 59

def instance_methods &block
  block ? module_eval(&block) : Instance_Methods.bind(self).call
end

#module_methods(&block) ⇒ Object Also known as: class_methods



62
63
64
# File 'lib/bj/stdext.rb', line 62

def module_methods &block
  block ? singleton_class(&block) : singleton_methods
end