Sha256: 65141370747df425103f2acf88460277087f5282732c9aaa40a97a094a96dfb5
Contents?: true
Size: 426 Bytes
Versions: 1
Compression:
Stored size: 426 Bytes
Contents
# frozen_string_literal: true module YandexCheckout class Response extend Dry::Initializer option :id, proc(&:to_s) option :status, proc(&:to_s), default: proc { nil } class << self def build(*res) body = res.last new JSON.parse(body.first) end def new(opts) super opts.each_with_object({}) { |(key, val), obj| obj[key.to_sym] = val } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yandex-checkout-0.1.1 | lib/yandex-checkout/response.rb |