class Appsignal::EventFormatter::MongoRubyDriver::QueryFormatter
def self.format(strategy, command)
def self.format(strategy, command) # Stop processing if command is not a hash return {} unless command.is_a?(Hash) # Get the strategy and stop if it's not present strategies = ALLOWED[strategy.to_s] return {} unless strategies {}.tap do |hsh| command.each do |key, val| hsh[key] = apply_strategy(strategies[key], val) end end end