Class: Symbol

### Home Classes Methods

### In Files

- lib/backports/1.8.7/symbol/to_proc.rb
- lib/backports/1.9.1/symbol/capitalize.rb
- lib/backports/1.9.1/symbol/casecmp.rb
- lib/backports/1.9.1/symbol/comparable.rb
- lib/backports/1.9.1/symbol/comparison.rb
- lib/backports/1.9.1/symbol/downcase.rb
- lib/backports/1.9.1/symbol/element_reference.rb
- lib/backports/1.9.1/symbol/empty.rb
- lib/backports/1.9.1/symbol/length.rb
- lib/backports/1.9.1/symbol/match.rb
- lib/backports/1.9.1/symbol/size.rb
- lib/backports/1.9.1/symbol/succ.rb
- lib/backports/1.9.1/symbol/swapcase.rb
- lib/backports/1.9.1/symbol/upcase.rb

### Parent

Object

### Methods

- #<=>
- #=~
- #[]
- #capitalize
- #casecmp
- #downcase
- #empty?
- #length
- #match
- #next
- #size
- #succ
- #swapcase
- #to_proc
- #upcase

### Included Modules

- Comparable

### Class/Module Index

Quicksearch

- Prime
- Prime::EratosthenesGenerator
- Prime::EratosthenesSieve
- Prime::Generator23
- Prime::OldCompatibility
- Prime::PseudoPrimeGenerator
- Prime::TrialDivision
- Prime::TrialDivisionGenerator
- Backports
- Backports::MOST_EXTREME_OBJECT_EVER
- Backports::Random
- Backports::Random::Implementation
- Backports::Random::MT19937
- Backports::StdLib
- Backports::StdLib::LoadedFeatures
- Enumerator
- Enumerator::GeneratorBP
- Enumerator::Lazy
- Enumerator::Yielder
- Matrix
- Matrix::EigenvalueDecomposition
- Matrix::LUPDecomposition
- Enumerable
- Enumerable::Enumerator
- File
- File::Constants
- ARGF
- Array
- BasicObject
- Bignum
- Binding
- Complex
- Dir
- ENV
- Fixnum
- Float
- GC
- Hash
- IO
- Integer
- Kernel
- Math
- Method
- Module
- NilClass
- Numeric
- Object
- ObjectSpace
- OpenStruct
- Proc
- Process
- Random
- Range
- Regexp
- Set
- StopIteration
- String
- Struct
- Symbol
- UnboundMethod

No matching classes.

# Symbol

### Public Instance Methods

<=>(with) click to toggle source

    # File lib/backports/1.9.1/symbol/comparison.rb, line 3
    def <=>(with)
      return nil unless with.is_a? Symbol
      to_s <=> with.to_s
    end

=~(with) click to toggle source
Alias for: match
[](*args) click to toggle source

    # File lib/backports/1.9.1/symbol/element_reference.rb, line 3
    def [](*args)
      to_s[*args]
    end

capitalize() click to toggle source

    # File lib/backports/1.9.1/symbol/capitalize.rb, line 3
    def capitalize
      to_s.capitalize.to_sym
    end

casecmp(with) click to toggle source

    # File lib/backports/1.9.1/symbol/casecmp.rb, line 3
    def casecmp(with)
      return nil unless with.is_a? Symbol
      to_s.casecmp(with.to_s)
    end

downcase() click to toggle source

    # File lib/backports/1.9.1/symbol/downcase.rb, line 3
    def downcase
      to_s.downcase.to_sym
    end

empty?() click to toggle source

    # File lib/backports/1.9.1/symbol/empty.rb, line 3
    def empty?
      to_s.empty?
    end

length() click to toggle source

    # File lib/backports/1.9.1/symbol/length.rb, line 3
    def length
      to_s.length
    end

match(with) click to toggle source

    # File lib/backports/1.9.1/symbol/match.rb, line 3
    def match(with)
      to_s =~ with
    end

Also aliased as: =~
next() click to toggle source
Alias for: succ
size() click to toggle source

    # File lib/backports/1.9.1/symbol/size.rb, line 3
    def size
      to_s.size
    end

succ() click to toggle source

    # File lib/backports/1.9.1/symbol/succ.rb, line 3
    def succ
      to_s.succ.to_sym
    end

Also aliased as: next
swapcase() click to toggle source

    # File lib/backports/1.9.1/symbol/swapcase.rb, line 3
    def swapcase
      to_s.swapcase.to_sym
    end

to_proc() click to toggle source

Standard in ruby 1.8.7+. See official documentation

    # File lib/backports/1.8.7/symbol/to_proc.rb, line 4
    def to_proc
      Proc.new { |*args| args.shift.__send__(self, *args) }
    end

upcase() click to toggle source

    # File lib/backports/1.9.1/symbol/upcase.rb, line 3
    def upcase
      to_s.upcase.to_sym
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.