Class: Reportinator::LogicalStringFunction

Inherits:
StringFunction show all
Defined in:
lib/reportinator/functions/string/logical.rb

Constant Summary collapse

PREFIXES =
["@true", "@false", "@nil", "@null"]

Instance Method Summary collapse

Methods inherited from StringFunction

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
10
11
12
# File 'lib/reportinator/functions/string/logical.rb', line 5

def output
  case prefix
  when "@true" then true
  when "@false" then false
  when "@nil", "@null" then nil
  else element
  end
end