Module: Fastdfs::Client::Delegation::ClassMethods
- Defined in:
- lib/fastdfs-client/delegation.rb
Instance Method Summary collapse
Instance Method Details
#delegate(*methods, to:) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/fastdfs-client/delegation.rb', line 7 def delegate(*methods, to:) methods.each do |m| class_eval <<-EVAL, __FILE__, __LINE__ + 1 def #{m}(*args, &block) #{to}.#{m}(*args, &block) end EVAL end end |