Sha256: fc7bea07589b5e15a9e79df945d61ed3f981053ef607427c241b7b4e1428c5ed

Contents?: true

Size: 251 Bytes

Versions: 4

Compression:

Stored size: 251 Bytes

Contents

class Gator
  class RubyFileLoader

  def initialize sandbox
    @sandbox = sandbox
  end

  def sandbox
    @sandbox
  end

  def exec_file file
		exec_code File.binread( file )
	end

	def exec_code code
		sandbox.module_eval( code )
  end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gator-0.0.25.pre lib/gator/core/io/ruby_file_loader.rb
gator-0.0.24.pre lib/gator/core/io/ruby_file_loader.rb
gator-0.0.23.pre lib/gator/core/io/ruby_file_loader.rb
gator-0.0.22.pre lib/gator/core/io/ruby_file_loader.rb