Class: Dhall::Import::RelativePath
- Inherits:
-
Path
- Object
- Path
- Dhall::Import::RelativePath
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, #with
Instance Method Details
#chain_onto(relative_to) ⇒ Object
1555
1556
1557
1558
1559
|
# File 'lib/dhall/ast.rb', line 1555
def chain_onto(relative_to)
relative_to.with(
path: relative_to.path[0..-2] + path
)
end
|
#pathname ⇒ Object
1547
1548
1549
|
# File 'lib/dhall/ast.rb', line 1547
def pathname
Pathname.new(".").join(*path)
end
|
#to_s ⇒ Object
1551
1552
1553
|
# File 'lib/dhall/ast.rb', line 1551
def to_s
"./#{pathname}"
end
|