Module: ProxyTo::ClassExtension

Defined in:
lib/proxy_to/class_extension.rb

Instance Method Summary collapse

Instance Method Details

#proxy_to(*targets, **options) ⇒ void

This method returns an undefined value.

Parameters:

  • targets (<String, Symbol>)


5
6
7
8
9
# File 'lib/proxy_to/class_extension.rb', line 5

def proxy_to(*targets, **options)
  targets.reverse_each do |target|
    include ProxyTo::Target.new target, **options
  end
end

#singleton_proxy_to(*targets, **options) ⇒ Object

Parameters:

  • targets (<String, Symbol>)


12
13
14
15
16
# File 'lib/proxy_to/class_extension.rb', line 12

def singleton_proxy_to(*targets, **options)
  targets.reverse_each do |target|
    extend ProxyTo::Target.new target, **options
  end
end