anonymous?() public

A module may or may not have a name.

  module M; end # => "M"

  m = # => ""

A module gets a name when it is first assigned to a constant. Either via the module or class keyword or by an explicit assignment:

  m = # creates an anonymous module
  M = m          # => m gets a name here as a side-effect         # => "M"
Show source
Register or log in to add new notes.