Sha256: 9ed134607715807d3e72c2e50dd40338a3535c33e8faedfb561663761325b644

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 Bytes

Contents

module Fastdfs
  module Client

    module Delegation
      module ClassMethods
        
        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
      end
      
      def self.included(receiver)
        receiver.extend ClassMethods
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastdfs-client-2.0.0 lib/fastdfs-client/delegation.rb