Sha256: bce95428b257554eef4b455333fae618fff1e3f566195cdd5700e67dddbecc78
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
# frozen_string_literal: true module YandexCheckout 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 |
---|---|
yandex-checkout-0.1.1 | lib/yandex-checkout/optional.rb |