Sha256: e660b69a1e20a5968013803b166125afc69fa0a671dcfb2f8f3b1a148908edef
Contents?: true
Size: 734 Bytes
Versions: 4
Compression:
Stored size: 734 Bytes
Contents
module Yoda module Store module Objects module ConnectedDelegation # @param method_names [Array<Symbol>] # @return [void] def delegate_to_object(*method_names) if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7.0') method_names.each do |method_name| define_method(method_name) do |*args, **kwargs| object.public_send(method_name, *args, **kwargs) end end else method_names.each do |method_name| define_method(method_name) do |*args| object.public_send(method_name, *args) end end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems