Sha256: 3420b0a38a553d749bc1fba18b1ff64938530358ccd29c98e47ba9a557f40b6b
Contents?: true
Size: 601 Bytes
Versions: 8
Compression:
Stored size: 601 Bytes
Contents
module Cape module CoreExt # Adds methods missing from Ruby's Symbol core class. module Symbol # Compares the String representation of the Symbol to that of another. # # @param [Symbol] other # @return [0] the Symbol is equal to _other_ # @return [-1] the Symbol is lesser than _other_ # @return [1] the Symbol is greater than _other_ def <=>(other) to_s <=> other.to_s end end end end unless ::Symbol.instance_methods.collect(&:to_s).include?('<=>') ::Symbol.class_eval do include Cape::CoreExt::Symbol end end
Version data entries
8 entries across 8 versions & 1 rubygems