Method: HTTPClient::Util.try_require
- Defined in:
- lib/httpclient/util.rb
.try_require(feature) ⇒ Object
Try to require a feature and returns true/false if loaded
It returns ‘true’ for the second require in contrast of the standard require returns false if the feature is already loaded.
193 194 195 196 197 198 |
# File 'lib/httpclient/util.rb', line 193 def try_require(feature) require feature true rescue LoadError false end |