Sha256: ccf542feddc5d2c63fc52bd1e9614f2695c0b48f848ac7c0b59ee9571f71dbed
Contents?: true
Size: 502 Bytes
Versions: 1
Compression:
Stored size: 502 Bytes
Contents
# frozen_string_literal: true module Yookassa module Optional private def initialize(opts) super opts.each_with_object({}) { |(key, val), obj| obj[key.to_sym] = val } end def __options__ @__options__ ||= self.class.dry_initializer.attributes(self) end def respond_to_missing?(name, *) __options__.respond_to? name end def method_missing(*args, &block) respond_to_missing?(*args) ? __options__.send(*args, &block) : super end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yookassa-0.1.0 | lib/yookassa/optional.rb |