Symbol

ruby/spec describes 31 methods in core/symbol, and Metorex implements 31 of them. The parameters are what Method#parameters answers under Metorex.

  • Symbol#<=>: implemented, parameters [[:req]]. Compares self and other, using String#<=>.
  • Symbol#==: implemented, parameters [[:req]]. Returns true if object is the same object as self, false otherwise.
  • Symbol#===: implemented, parameters [[:req]]. Returns true if object is the same object as self, false otherwise.
  • Symbol#=~: implemented, parameters [[:req]]. Equivalent to symbol.to_s =~ object, including possible updates to global variables; see String#=~.
  • Symbol#[]: implemented, parameters [[:rest]]. Equivalent to symbol.to_s[]; see String#[].
  • Symbol.all_symbols: implemented, parameters [[:req, :args]]. Returns an array of all symbols currently in Ruby's symbol table: An example calling it.
  • Symbol#capitalize: implemented, parameters [[:rest]]. Equivalent to sym.to_s.capitalize.to_sym. An example calling it.
  • Symbol#casecmp: implemented, parameters [[:req]]. Like Symbol#<=>, but case-insensitive; equivalent to self.to_s.casecmp(object.to_s): An example calling it.
  • Symbol#casecmp?: implemented, parameters [[:req]]. Returns true if self and object are equal after Unicode case folding, otherwise false: An example calling it.
  • Symbol#downcase: implemented, parameters [[:rest]]. Equivalent to sym.to_s.downcase.to_sym. An example calling it.
  • Symbol#dup: implemented, parameters []. Produces a shallow copy of obj---the instance variables of obj are copied, but not the objects they reference. An example calling it.
  • Symbol#empty?: implemented, parameters []. Returns true if self is :'', false otherwise. An example calling it.
  • Symbol#encoding: implemented, parameters []. Equivalent to self.to_s.encoding; see String#encoding. An example calling it.
  • Symbol#end_with?: implemented, parameters [[:rest]]. Equivalent to self.to_s.end_with?; see String#end_with?. An example calling it.
  • Symbol#id2name: implemented, parameters [[:rest, :args]]. Returns a string representation of self (not including the leading colon): An example calling it.
  • Symbol#inspect: implemented, parameters []. Returns a string representation of self (including the leading colon): An example calling it.
  • Symbol#intern: implemented, parameters [[:rest, :args]]. Returns self. An example calling it.
  • Symbol#length: implemented, parameters []. Equivalent to self.to_s.length; see String#length. An example calling it.
  • Symbol#match: implemented, parameters [[:rest]]. Equivalent to self.to_s.match, including possible updates to global variables; see String#match. An example calling it.
  • Symbol#match?: implemented, parameters [[:rest]]. Equivalent to sym.to_s.match?; see String#match. An example calling it.
  • Symbol#name: implemented, parameters [[:rest, :args]]. Returns a frozen string representation of self (not including the leading colon): An example calling it.
  • Symbol#next: implemented, parameters []. Equivalent to self.to_s.succ.to_sym: An example calling it.
  • Symbol#size: implemented, parameters []. Equivalent to self.to_s.length; see String#length. An example calling it.
  • Symbol#slice: implemented, parameters [[:rest]]. Equivalent to symbol.to_s[]; see String#[]. An example calling it.
  • Symbol#start_with?: implemented, parameters [[:rest]]. Equivalent to self.to_s.start_with?; see String#start_with?. An example calling it.
  • Symbol#succ: implemented, parameters []. Equivalent to self.to_s.succ.to_sym: An example calling it.
  • Symbol#swapcase: implemented, parameters [[:rest]]. Equivalent to sym.to_s.swapcase.to_sym. An example calling it.
  • Symbol#to_proc: implemented, parameters []. Returns a Proc object which calls the method with name of self on the first parameter and passes the remaining parameters to the method. An example calling it.
  • Symbol#to_s: implemented, parameters []. Returns a string representation of self (not including the leading colon): An example calling it.
  • Symbol#to_sym: implemented, parameters [[:rest, :args]]. Returns self. An example calling it.
  • Symbol#upcase: implemented, parameters [[:rest]]. Equivalent to sym.to_s.upcase.to_sym. An example calling it.

The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.