Sha256: 58611133634d1f8268042ea1ac82f8181595f2cbbe6633881d70cb3ef730cedc

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

# -*- encoding: utf-8 -*-

# Symbol extensions

class Symbol

  # Compare this symbol to another symbol.
  # 
  # @example Less than
  #    :foo <=> :goo 
  #    => -1
  #
  # @example Equal
  #    :foo <=> :foo
  #    => 0
  #
  # @example Greater than
  #    :foo <=> :bar 
  #    => 1
  #
  # @return [-1,0,1] -1 if this is < that, 0

  include Comparable
  def <=>(that)
    self.to_s<=>that.to_s
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webget_ruby_ramp-1.8.2 lib/webget_ruby_ramp/symbol.rb