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, decode, from_string, #initialize, #location, #origin, #resolve, #to_s, #with

Constructor Details

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

Instance Method Details

#chain_onto(relative_to) ⇒ Object



1487
1488
1489
1490
1491
1492
1493
# File 'lib/dhall/ast.rb', line 1487

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

	self
end

#pathnameObject



1479
1480
1481
# File 'lib/dhall/ast.rb', line 1479

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

#to_uri(scheme, base_uri) ⇒ Object



1483
1484
1485
# File 'lib/dhall/ast.rb', line 1483

def to_uri(scheme, base_uri)
	scheme.new(uri: base_uri + Util.path_components_to_uri(*path))
end