Class: ArelExtensions::Nodes::GroupConcat

Inherits:
AggregateFunction show all
Defined in:
lib/arel_extensions/nodes/concat.rb

Constant Summary collapse

RETURN_TYPE =
:string

Instance Attribute Summary collapse

Attributes inherited from AggregateFunction

#group, #order

Instance Method Summary collapse

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(node, separator = ', ', **opts) ⇒ GroupConcat

Returns a new instance of GroupConcat.



48
49
50
51
# File 'lib/arel_extensions/nodes/concat.rb', line 48

def initialize node, separator = ', ', **opts
  @separator = convert_to_node(separator)
  super node, opts
end

Instance Attribute Details

#separatorObject

Returns the value of attribute separator.



46
47
48
# File 'lib/arel_extensions/nodes/concat.rb', line 46

def separator
  @separator
end