Class: Reportinator::JoinArrayFunction

Inherits:
ArrayFunction show all
Defined in:
lib/reportinator/functions/array/join.rb

Constant Summary collapse

PREFIXES =
[">join"]

Instance Method Summary collapse

Methods inherited from ArrayFunction

accepts?, #get, #set_attributes

Methods inherited from Function

parse, #parse_and_execute_value, #parse_value, #prefixes

Methods inherited from Base

config, #config, logger, #logger

Methods included from Helpers

#merge_hash, #merge_hash!, #symbolize_attributes

Instance Method Details

#outputObject



5
6
7
8
9
# File 'lib/reportinator/functions/array/join.rb', line 5

def output
  joiner = parse_value(target)
  joiner = (joiner.instance_of?(String) ? joiner : target)
  values.map { |value| parse_value(value) }.join(joiner)
end