Sha256: 0179cbd94f0cd7a0b3c75fa864d9d2e9d0fa9233c20c8ef02b282075db2dc9da

Contents?: true

Size: 382 Bytes

Versions: 6

Compression:

Stored size: 382 Bytes

Contents

class Symbol

  unless method_defined?(:succ)  # 1.9+ TODO: is this right?

    # Successor method for symobol. This simply converts
    # the symbol to a string uses String#succ and then
    # converts it back to a symbol.
    #
    #   :a.succ => :b
    #
    # TODO: Make this work more like a simple character dial?

    def succ
      self.to_s.succ.intern
    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/symbol/succ.rb
facets-2.8.3 lib/core/facets/symbol/succ.rb
facets-2.8.2 lib/core/facets/symbol/succ.rb
facets-2.8.1 lib/core/facets/symbol/succ.rb
facets-2.8.0 lib/core/facets/symbol/succ.rb
facets-2.7.0 lib/core/facets/symbol/succ.rb