Module: RelicLink::Coh3::Util

Included in:
Client
Defined in:
lib/relic_link/coh3/util.rb

Overview

Miscellaneous utility and helper methods.

Instance Method Summary collapse

Instance Method Details

#array_params(options) ⇒ Object

Formats the options as JSON (mainly to format arrays correctly for Relic’s API).

Parameters:

  • options (Hash)

    Parameters to be added to the query string.



11
12
13
14
15
# File 'lib/relic_link/coh3/util.rb', line 11

def array_params(options)
  options.transform_values do |value|
    JSON.generate(Array(value))
  end
end