Sha256: a6ee8ca77a5fab7f4746d4d70c7858d7311a29428421b67ef9f1e854d18a8105

Contents?: true

Size: 162 Bytes

Versions: 171

Compression:

Stored size: 162 Bytes

Contents

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

Version data entries

171 entries across 153 versions & 9 rubygems

Version Path
tins-0.3.13 lib/tins/require_maybe.rb
tins-0.3.12 lib/tins/require_maybe.rb
tins-0.3.11 lib/tins/require_maybe.rb
tins-0.3.10 lib/tins/require_maybe.rb
tins-0.3.9 lib/tins/require_maybe.rb
tins-0.3.8 lib/tins/require_maybe.rb
tins-0.3.7 lib/tins/require_maybe.rb
tins-0.3.6 lib/tins/require_maybe.rb
tins-0.3.5 lib/tins/require_maybe.rb
tins-0.3.4 lib/tins/require_maybe.rb
tins-0.3.3 lib/tins/require_maybe.rb