Module: Vmit::VFS

Defined in:
lib/vmit/vfs.rb

Defined Under Namespace

Classes: Handler, ISO, Local, URI

Class Method Summary collapse

Class Method Details

.from(location, *rest, &block) ⇒ Object

Opens a location

Raises:

  • (ArgumentError)


33
34
35
36
37
38
39
40
# File 'lib/vmit/vfs.rb', line 33

def self.from(location, *rest, &block)
  [ISO, URI, Local].each do |handler|
    if handler.accept?(location)
      return handler.from(location)
    end
  end
  raise ArgumentError.new("#{location} not supported")
end