Class: Module
- Inherits:
-
Object
- Object
- Module
- Defined in:
- lib/inline.rb
Overview
module Inline
Instance Method Summary collapse
-
#inline(lang = :C, options = {}) {|builder| ... } ⇒ Object
Extends the Module class to have an inline method.
Instance Method Details
#inline(lang = :C, options = {}) {|builder| ... } ⇒ Object
Extends the Module class to have an inline method. The default language/builder used is C, but can be specified with the lang parameter.
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 |
# File 'lib/inline.rb', line 840 def inline(lang = :C, ={}) Inline.register self require "inline/#{lang}" unless Inline.const_defined? lang builder_class = Inline.const_get lang builder = builder_class.new self yield builder unless [:testing] then unless builder.load_cache then builder.build builder.load end end end |