Type:
Class

Core extension library

Rake extensions to Module.

A Module is a collection of methods and constants. The methods in a module may be instance methods or module methods. Instance methods appear as methods in a class when the module is included, module methods do not. Conversely, module methods may be called without creating an encapsulating object, while instance methods may not. (See Module#module_function)

In the descriptions that follow, the parameter sym refers to a symbol, which is either a quoted string or a Symbol (such as :name).

module Mod
  include Math
  CONST = 1
  def meth
    #  ...
  end
end
Mod.class              #=> Module
Mod.constants          #=> [:CONST, :PI, :E]
Mod.instance_methods   #=> [:meth]
public_constant

mod.public_constant(symbol, ...) => mod Instance Public methods Makes

2015-04-19 04:43:10
private_class_method

mod.private_class_method(symbol, ...) â mod Instance Public methods Makes

2015-04-19 04:03:07
inspect

inspect() Instance Public methods Alias for:

2015-04-19 03:33:26
public_method_defined?

mod.public_method_defined?(symbol) â true or false Instance Public methods Returns

2015-04-19 04:55:19
method_defined?

mod.method_defined?(symbol) â true or false Instance Public methods Returns

2015-04-19 03:46:05
===

mod === obj â true or false Instance Public methods Case EqualityâReturns

2015-04-19 02:12:14
name

mod.name â string Instance Public methods Returns the name of the module

2015-04-19 03:57:43
==

obj == other â true or falseobj.equal?(other) â true or falseobj.eql?(other) â true or false

2015-04-19 02:07:31
public_class_method

mod.public_class_method(symbol, ...) â mod Instance Public methods Makes

2015-04-19 04:36:44
<=

mod Instance Public methods Returns true

2015-04-19 01:58:51