class JMESPath::Nodes::ToStringFunction

Public Instance Methods

call(args) click to toggle source
# File lib/jmespath/nodes/function.rb, line 362
def call(args)
  if args.count == 1
    value = args.first
    String === value ? value : value.to_json
  else
    return maybe_raise Errors::InvalidArityError, "function to_string() expects one argument"
  end
end