Class: OpenapiParameters::Unpackers::DelimitedObject
- Inherits:
-
Data
- Object
- Data
- OpenapiParameters::Unpackers::DelimitedObject
- Defined in:
- lib/openapi_parameters/unpackers.rb
Instance Attribute Summary collapse
-
#delimiter ⇒ Object
readonly
Returns the value of attribute delimiter.
Instance Method Summary collapse
Instance Attribute Details
#delimiter ⇒ Object (readonly)
Returns the value of attribute delimiter
54 55 56 |
# File 'lib/openapi_parameters/unpackers.rb', line 54 def delimiter @delimiter end |
Instance Method Details
#call(value) ⇒ Object
55 56 57 58 59 60 |
# File 'lib/openapi_parameters/unpackers.rb', line 55 def call(value) entries = value.split(delimiter) throw :skip, value if entries.length.odd? Hash[*entries] end |