Class: Arel::Nodes::NamedFunction

Inherits:
Function
  • Object
show all
Includes:
Predications
Defined in:
lib/ransack/adapters/active_record/3.0/compat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Predications

#as

Constructor Details

#initialize(name, expr, aliaz = nil) ⇒ NamedFunction

Returns a new instance of NamedFunction.



70
71
72
73
74
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 70

def initialize name, expr, aliaz = nil
  super(expr, aliaz)
  @name = name
  @distinct = false
end

Instance Attribute Details

#distinctObject

Returns the value of attribute distinct.



66
67
68
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 66

def distinct
  @distinct
end

#nameObject

Returns the value of attribute name.



66
67
68
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 66

def name
  @name
end