# File lib/facets/more/script.rb, line 36 def initialize(main_file, options=nil, &block) extend self options ||= {} @main_file = File.expand_path(main_file) @load_path = options[:load_path] || [] #@load_path |= [File.dirname(@main_file)] # before or after? @loaded_features = options[:loaded_features] || {} # TODO In order to load/require at the instance level. # This needs to be in a separate namespace however # b/c it can interfere with what is expected. #[ :require, :load ].each{ |meth| # m = method(meth) # define_method(meth) do |*args| m.call(*args) end #} module_eval(&block) if block extend self load_in_module(main_file) end