In Files

Parent

Methods

Class Index [+]

Quicksearch

Module

Attributes

options[R]

options is a hash that allows you to pass extra data to your builder. The only key that is guaranteed to exist is :testing.

Public Instance Methods

inline(lang = :C, options={}) click to toggle source

Extends the Module class to have an inline method. The default language/builder used is C, but can be specified with the lang parameter.

     # File lib/inline.rb, line 800
800:   def inline(lang = :C, options={})
801:     Inline.register self
802: 
803:     case options
804:     when TrueClass, FalseClass then
805:       warn "WAR\NING: 2nd argument to inline is now a hash, changing to {:testing=>#{options}}" unless options
806:       options = { :testing => options  }
807:     when Hash
808:       options[:testing] ||= false
809:     else
810:       raise ArgumentError, "BLAH"
811:     end
812: 
813:     builder_class = begin
814:                       Inline.const_get(lang)
815:                     rescue NameError
816:                       require "inline/#{lang}"
817:                       Inline.const_get(lang)
818:                     end
819: 
820:     @options = options
821:     builder = builder_class.new self
822: 
823:     yield builder
824: 
825:     unless options[:testing] then
826:       unless builder.load_cache then
827:         builder.build
828:         builder.load
829:       end
830:     end
831:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.