Class: Dhall::Import::RelativePath

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



1397
1398
1399
1400
1401
# File 'lib/dhall/ast.rb', line 1397

def chain_onto(relative_to)
  relative_to.with(
    path: relative_to.path[0..-2] + path
  )
end

#pathnameObject



1393
1394
1395
# File 'lib/dhall/ast.rb', line 1393

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