Class Symbol
In: lib/symbol.rb
Parent: Object

Methods

as   to_sql  

Public Instance methods

Returns the symbol aliased (including ‘as’) as the aliased name

   :book.as(:category)     #=> :"book as category"

[Source]

    # File lib/symbol.rb, line 16
16:   def as(alias_name)
17:     "#{self} as #{alias_name}".to_sym
18:   end

Returns a string with single quotes escaped.

   "it's".to_sql     #=> "'it''s'"

[Source]

   # File lib/symbol.rb, line 7
7:   def to_sql
8:     to_s
9:   end

[Validate]