Stats

116 Contributors: 4
2016-10-19
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook

Modules

Download ruby eBook

Syntax

  • Declaration

    module Name;
    
        any ruby expressions;
    
    end
    

Remarks

Module names in Ruby are constants, so they have to start with a capital letter.

module foo; end # Syntax error: class/module name must be CONSTANT

Related Examples