Sha256: 9e91964efb6c873d10eab01c6bf95400aa2df58c0e8b530c0ad86db298dd2995
Contents?: true
Size: 602 Bytes
Versions: 3
Compression:
Stored size: 602 Bytes
Contents
# frozen_string_literal: true require 'duckface/services/check_class_implements_interface' require 'duckface/implementation_methods' require 'duckface/null_check_session' module Duckface # Provides methods on any class to indicate usage of interfaces module ObjectSugar def check_it_implements(_interface_class) NullCheckSession.new end def says_it_implements?(_interface_class) false end def implements_interface(interface_class) extend Duckface::ImplementationMethods include interface_class end end end Class.include(Duckface::ObjectSugar)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
duckface-interfaces-0.0.5 | lib/duckface/object_sugar.rb |
duckface-interfaces-0.0.4 | lib/duckface/object_sugar.rb |
duckface-interfaces-0.0.3 | lib/duckface/object_sugar.rb |