Module: Cape::CoreExt::Symbol Private

Defined in:
lib/cape/core_ext/symbol.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Adds methods missing from Ruby’s Symbol core class.

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ 0, ...

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Compares the String representation of the Symbol to that of another.

Parameters:

Returns:

  • (0)

    the Symbol is equal to other

  • (-1)

    the Symbol is lesser than other

  • (1)

    the Symbol is greater than other



15
16
17
# File 'lib/cape/core_ext/symbol.rb', line 15

def <=>(other)
  to_s <=> other.to_s
end