Class: OpenapiParameters::Unpackers::NonExplodePathObject

Inherits:
Data
  • Object
show all
Defined in:
lib/openapi_parameters/unpackers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#array_unpackerObject (readonly)

Returns the value of attribute array_unpacker

Returns:

  • (Object)

    the current value of array_unpacker



65
66
67
# File 'lib/openapi_parameters/unpackers.rb', line 65

def array_unpacker
  @array_unpacker
end

Instance Method Details

#call(value) ⇒ Object



66
67
68
69
70
71
# File 'lib/openapi_parameters/unpackers.rb', line 66

def call(value)
  array = array_unpacker.call(value)
  throw :skip, value if array.length.odd?

  Hash[*array]
end