Class: Scrape::DefaultLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/scrape/default_loader.rb

Defined Under Namespace

Classes: Sandbox

Instance Method Summary collapse

Instance Method Details

#load(path) ⇒ Object


2
3
4
5
6
7
8
9
10
# File 'lib/scrape/default_loader.rb', line 2

def load path
  path = File.expand_path path
  sites = {}

  sandbox = Sandbox.new sites
  sandbox.instance_eval File.read(path), path

  sites
end