Class: Symbol

Inherits:
Object
  • Object
show all
Includes:
Squeel::Nodes::Aliasing, Squeel::Nodes::Ordering, Squeel::Nodes::PredicateMethods
Defined in:
lib/squeel/core_ext/symbol.rb

Overview

These extensions to Symbol are loaded optionally, mostly to provide a small amount of backwards compatibility with MetaWhere.

Examples:

Load Symbol extensions

Squeel.configure do |config|
  config.load_core_extensions :symbol
end

Instance Method Summary collapse

Methods included from Squeel::Nodes::Ordering

#asc, #desc

Methods included from Squeel::Nodes::Aliasing

#as

Methods included from Squeel::Nodes::PredicateMethods

#eq

Instance Method Details

#func(*args) ⇒ Object


13
14
15
# File 'lib/squeel/core_ext/symbol.rb', line 13

def func(*args)
  Squeel::Nodes::Function.new(self, args)
end

#innerObject


17
18
19
# File 'lib/squeel/core_ext/symbol.rb', line 17

def inner
  Squeel::Nodes::Join.new(self, Squeel::InnerJoin)
end

#of_class(klass) ⇒ Object


25
26
27
# File 'lib/squeel/core_ext/symbol.rb', line 25

def of_class(klass)
  Squeel::Nodes::Join.new(self, Squeel::InnerJoin, klass)
end

#outerObject


21
22
23
# File 'lib/squeel/core_ext/symbol.rb', line 21

def outer
  Squeel::Nodes::Join.new(self, Squeel::OuterJoin)
end