Module: Tins::RequireMaybe

Included in:
Object
Defined in:
lib/tins/require_maybe.rb

Instance Method Summary collapse

Instance Method Details

#require_maybe(library) ⇒ Object



3
4
5
6
7
# File 'lib/tins/require_maybe.rb', line 3

def require_maybe(library)
  require library
rescue LoadError => e
  block_given? and yield e
end