Class: DuckTyper::CanonicalInterfaceChecker
- Inherits:
-
Object
- Object
- DuckTyper::CanonicalInterfaceChecker
- Defined in:
- lib/duck_typer/canonical_interface_checker.rb,
lib/duck_typer/canonical_interface_checker/result.rb
Overview
Compares each class in a list against a single canonical reference class.
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(objects = nil, canonical:, namespace: nil, type: :instance_methods, methods: nil, strict: false, name: nil) ⇒ CanonicalInterfaceChecker
constructor
A new instance of CanonicalInterfaceChecker.
Constructor Details
#initialize(objects = nil, canonical:, namespace: nil, type: :instance_methods, methods: nil, strict: false, name: nil) ⇒ CanonicalInterfaceChecker
Returns a new instance of CanonicalInterfaceChecker.
9 10 11 12 |
# File 'lib/duck_typer/canonical_interface_checker.rb', line 9 def initialize(objects = nil, canonical:, namespace: nil, type: :instance_methods, methods: nil, strict: false, name: nil) @setup = InterfaceSetup.new(objects, namespace:, type:, methods:, strict:, name:, minimum: 1) @canonical = canonical end |