Module: Cape::CoreExt::Symbol

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

Overview

Adds methods missing from Ruby’s Symbol core class.

Instance Method Summary collapse

Instance Method Details

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

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