lib/dry/behaviour.rb in dry-behaviour-0.1.0 vs lib/dry/behaviour.rb in dry-behaviour-0.1.1
- old
+ new
@@ -1,14 +1,18 @@
require 'dry/behaviour/version'
require 'dry/behaviour/black_tie'
module Dry
- module Behaviour
- # Your code goes here...
- end
-
module Protocol
def self.included(base)
base.singleton_class.prepend(Dry::BlackTie)
+ end
+
+ class << self
+ # rubocop:disable Style/AsciiIdentifiers
+ def defimpl(protocol = nil, target: nil, delegate: [], map: {}, &λ)
+ Dry::BlackTie.defimpl(protocol, target: target, delegate: delegate, map: map, &λ)
+ end
+ # rubocop:enable Style/AsciiIdentifiers
end
end
end