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



1537
1538
1539
1540
1541
1542
1543
# File 'lib/dhall/ast.rb', line 1537

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

	self
end

#pathnameObject



1529
1530
1531
# File 'lib/dhall/ast.rb', line 1529

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

#to_uri(scheme, base_uri) ⇒ Object



1533
1534
1535
# File 'lib/dhall/ast.rb', line 1533

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