Top Level Namespace
Defined Under Namespace
Modules: Xirr
Instance Method Summary collapse
-
#skip_native(reason) ⇒ Object
The native rtsafe solver is optional.
Instance Method Details
#skip_native(reason) ⇒ Object
The native rtsafe solver is optional. If it can't be built — no working C
compiler, or create_makefile fails — write a do-nothing Makefile so
gem install still succeeds; at runtime the require is rescued and the gem
falls back to the pure-Ruby solver.
7 8 9 10 11 |
# File 'ext/xirr/extconf.rb', line 7 def skip_native(reason) warn "xirr: skipping native extension (#{reason}); using pure Ruby." File.write('Makefile', "all:\n\t@true\ninstall:\n\t@true\nclean:\n\t@true\n") true end |