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



1298
1299
1300
1301
1302
1303
1304
# File 'lib/dhall/ast.rb', line 1298

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

  self
end

#pathnameObject



1290
1291
1292
# File 'lib/dhall/ast.rb', line 1290

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

#to_uri(scheme, authority) ⇒ Object



1294
1295
1296
# File 'lib/dhall/ast.rb', line 1294

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