Module: Vangrail::Native
- Defined in:
- lib/vangrail/native.rb
Overview
Optional Magnus extension. The gem stays installable without a compiler;
this module is present only after vangrail-native is built.
Class Method Summary collapse
Class Method Details
.available? ⇒ Boolean
9 10 11 12 |
# File 'lib/vangrail/native.rb', line 9 def available? load_ext @available end |
.load_ext ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/vangrail/native.rb', line 14 def load_ext return if defined?(@available) require 'vangrail_native' @available = true rescue LoadError @available = false end |