Class: ArelExtensions::Nodes::GroupConcat
- Inherits:
-
Function
- Object
- Arel::Nodes::Function
- Function
- ArelExtensions::Nodes::GroupConcat
- Defined in:
- lib/arel_extensions/nodes/concat.rb
Constant Summary collapse
- RETURN_TYPE =
:string
Instance Attribute Summary collapse
-
#orders ⇒ Object
Returns the value of attribute orders.
Instance Method Summary collapse
-
#initialize(expr) ⇒ GroupConcat
constructor
A new instance of GroupConcat.
Methods inherited from Function
#!=, #==, #as, #convert_to_date_node, #convert_to_datetime_node, #convert_to_node, #convert_to_number, #convert_to_string_node, #expr, #left, #return_type, #right, #type_of_attribute
Methods included from Predications
#cast, #convert_to_node, #imatches, #in, #matches, #not_in, #when
Constructor Details
#initialize(expr) ⇒ GroupConcat
Returns a new instance of GroupConcat.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/arel_extensions/nodes/concat.rb', line 48 def initialize expr tab = expr.map { |arg| if arg.is_a?(Array) @orders = arg nil else convert_to_node(arg) end }.compact super(tab) end |
Instance Attribute Details
#orders ⇒ Object
Returns the value of attribute orders.
46 47 48 |
# File 'lib/arel_extensions/nodes/concat.rb', line 46 def orders @orders end |