Module: TypeToolkit
- Defined in:
- lib/type_toolkit/dsl.rb,
lib/type_toolkit.rb,
lib/type_toolkit/version.rb,
lib/type_toolkit/interface.rb,
lib/type_toolkit/method_patch.rb,
lib/type_toolkit/ext/nil_assertions.rb,
lib/type_toolkit/method_def_recorder.rb,
lib/type_toolkit/has_abstract_methods.rb,
lib/type_toolkit/abstract_method_receiver.rb,
sig/type_toolkit.rbs
Overview
typed: true frozen_string_literal: true
Defined Under Namespace
Modules: AbstractInstanceMethodReceiver, DSL, HasAbstractMethods, Interface, MethodDefRecorder, MethodPatch Classes: AbstractMethodNotImplementedError, UnexpectedNilError
Constant Summary collapse
- VERSION =
"0.0.6"
Class Method Summary collapse
Class Method Details
.make_interface!(mod) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/type_toolkit/interface.rb', line 12 def make_interface!(mod) if Class === mod raise TypeError, "Classes can't be interfaces. Did you mean to make it `abstract` instead?" end mod.extend(TypeToolkit::Interface) mod.extend(TypeToolkit::DSL) mod.extend(TypeToolkit::MethodDefRecorder) mod.extend(TypeToolkit::HasAbstractMethods) end |