Sha256: be8441db1f2e075fed5a908f24abf6e3e96dfff2521097cb3cc54af512ba7e62

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 Bytes

Contents

# encoding: utf-8
require 'implements'

# Add functionality to Class, which enables us to use
# `Implements::Implementation`'s ::implements method
# without having to pre-extend the class.
class Class
  def implements(*args, &block)
    return super if defined?(super)

    extend(Implements::Implementation)
    send(__method__, *args, &block)
  end
  private :implements
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
implements-0.0.2 lib/implements/global.rb