Module: Diversion::Decode

Includes:
Base64, Signing
Included in:
Client
Defined in:
lib/diversion/decode.rb,
lib/diversion/decode/json.rb,
lib/diversion/decode/params.rb

Defined Under Namespace

Modules: Json, Params

Constant Summary collapse

DECODERS =
[ Params, Json ]

Constants included from Signing

Signing::MAX_SIGN_LENGTH

Instance Method Summary collapse

Methods included from Signing

sign_data

Instance Method Details

#decode(data, opts = {}) ⇒ Object

Raises:

  • (ArgumentError)


11
12
13
14
15
16
17
18
# File 'lib/diversion/decode.rb', line 11

def decode(data, opts = {})
  raise ArgumentError if data.length == 0

  opts = options.merge(opts)

  # get hash for required type
  hash = opts[:url_decoding].get_hash(data, opts)
end