Class: Module

Inherits:
Object show all
Defined in:
lib/rmtools/core/module.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#childrenObject



4
5
6
# File 'lib/rmtools/core/module.rb', line 4

def children
  constants.map! {|c| module_eval c}.find_all {|c| c.kinda Module rescue()}
end

#each_childObject



8
9
10
11
# File 'lib/rmtools/core/module.rb', line 8

def each_child
  constants.map! {|c| module_eval c}.each {|c| yield c if c.kinda Module}
  constants
end

#my_methods(filter = //) ⇒ Object Also known as: personal_methods



17
18
19
# File 'lib/rmtools/core/module.rb', line 17

def my_methods filter=//
  self.singleton_methods.sort!.grep(filter)
end

#self_nameObject



13
14
15
# File 'lib/rmtools/core/module.rb', line 13

def self_name
  @self_name ||= name.rsplit('::', 2)[1] || name
end