Class: Proc

Inherits:
Object show all
Defined in:
lib/smoke_monster/safety_proc.rb,
lib/smoke_monster/lambda_to_object.rb

Instance Method Summary collapse

Instance Method Details

#call_safelyObject



2
3
4
5
6
# File 'lib/smoke_monster/safety_proc.rb', line 2

def call_safely
  self.call
rescue
  yield if block_given?
end

#to_objectObject



2
3
4
# File 'lib/smoke_monster/lambda_to_object.rb', line 2

def to_object
  SmokeMonster::LazyCover.new self
end