Class: Dhall::Import::AbsolutePath

Inherits:
Path
  • Object
show all
Defined in:
lib/dhall/ast.rb

Instance Method Summary collapse

Methods inherited from Path

#as_json, #canonical, from_string, #initialize, #origin, #resolve, #to_s, #with

Constructor Details

This class inherits a constructor from Dhall::Import::Path

Instance Method Details

#chain_onto(relative_to) ⇒ Object



1383
1384
1385
1386
1387
1388
1389
# File 'lib/dhall/ast.rb', line 1383

def chain_onto(relative_to)
	if relative_to.is_a?(URI)
		raise ImportBannedException, "remote import cannot import #{self}"
	end

	self
end

#pathnameObject



1375
1376
1377
# File 'lib/dhall/ast.rb', line 1375

def pathname
	Pathname.new("/").join(*path)
end

#to_uri(scheme, authority) ⇒ Object



1379
1380
1381
# File 'lib/dhall/ast.rb', line 1379

def to_uri(scheme, authority)
	scheme.new(nil, authority, *path, nil)
end