Class: Monolens::Type::Lenses

Inherits:
Object
  • Object
show all
Extended by:
ErrorHandling
Defined in:
lib/monolens/type/lenses.rb

Class Method Summary collapse

Methods included from ErrorHandling

fail!

Class Method Details

.===(arg) ⇒ Object



6
7
8
# File 'lib/monolens/type/lenses.rb', line 6

def self.===(arg)
  arg.is_a?(Lens)
end

.dress(value, registry, &block) ⇒ Object



10
11
12
13
14
# File 'lib/monolens/type/lenses.rb', line 10

def self.dress(value, registry, &block)
  registry.lens(value)
rescue TypeError => ex
  fail!(ex.message, &block)
end