Sha256: f752d10ba15c89c14bbdbcf18bb006e6b6c9cd052975ff47b2afad74154a6153

Contents?: true

Size: 411 Bytes

Versions: 28

Compression:

Stored size: 411 Bytes

Contents

class Module

  # return the module objects direct sub modules
  def modules
    constants.collect {|const_name| const_get(const_name)}.select {|const| const.class == Module}
  end

  # return the module objects direct sub modules
  def classes
    constants.collect {|const_name| const_get(const_name)}.select {|const| const.class == Class}
  end

  alias :submodules :modules
  alias :subclasses :classes

end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
mpatch-1.3.0 lib/mpatch/module.rb
mpatch-1.2.0 lib/mpatch/module.rb
mpatch-1.1.0 lib/mpatch/module.rb
mpatch-1.0.2 lib/mpatch/module.rb
mpatch-1.0.1 lib/mpatch/module.rb
mpatch-1.0.0 lib/mpatch/module.rb
procemon-0.8.1 lib/procemon/mpatch/module.rb
procemon-0.8.0 lib/procemon/mpatch/module.rb
procemon-0.7.0 lib/procemon/mpatch/module.rb
procemon-0.6.3 lib/procemon/mpatch/module.rb
procemon-0.6.2 lib/procemon/mpatch/module.rb
procemon-0.6.1 lib/procemon/mpatch/module.rb
procemon-0.5.0 lib/procemon/mpatch/module.rb
procemon-0.4.5 lib/procemon/mpatch/module.rb
procemon-0.4.4 lib/procemon/mpatch/module.rb
procemon-0.4.3 lib/procemon/mpatch/module.rb
procemon-0.4.2 lib/procemon/mpatch/module.rb
procemon-0.4.1 lib/procemon/mpatch/module.rb
procemon-0.4.0 lib/procemon/mpatch/module.rb
procemon-0.3.4 lib/procemon/mpatch/module.rb