Module: DefinedMethods

Defined in:
lib/defined_methods.rb,
lib/defined_methods/version.rb,
lib/defined_methods/instance.rb,
lib/defined_methods/singleton.rb

Defined Under Namespace

Modules: Instance, Singleton

Constant Summary collapse

VERSION =
'0.1.5'

Class Method Summary collapse

Class Method Details

.fqmn(object_name, method, singleton) ⇒ Object



18
19
20
21
# File 'lib/defined_methods.rb', line 18

def fqmn(object_name, method, singleton)
  separator = singleton ? '.' : '#'
  object_name + separator + method.to_s
end

.in(object) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/defined_methods.rb', line 7

def in(object)
  [
    Singleton.methods_defined_in(object),
    Singleton.private_methods_defined_in(object),
    Singleton.protected_methods_defined_in(object),
    Instance.methods_defined_in(object),
    Instance.private_methods_defined_in(object),
    Instance.protected_methods_defined_in(object)
  ]
end