Class: Monolens::Type::Callback
- Inherits:
-
Object
- Object
- Monolens::Type::Callback
- Extended by:
- ErrorHandling
- Defined in:
- lib/monolens/type/callback.rb
Class Method Summary collapse
Methods included from ErrorHandling
Class Method Details
.===(instance) ⇒ Object
12 13 14 |
# File 'lib/monolens/type/callback.rb', line 12 def self.===(instance) instance.respond_to?(:call) end |
.dress(instance, registry, &block) ⇒ Object
6 7 8 9 10 |
# File 'lib/monolens/type/callback.rb', line 6 def self.dress(instance, registry, &block) fail!("Invalid #{instance}", &block) unless self === instance instance end |