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
1505
1506
1507
1508
1509
|
# File 'lib/dhall/ast.rb', line 1505
def chain_onto(relative_to)
relative_to.with(
path: relative_to.path[0..-2] + path
)
end
|
#pathname ⇒ Object
1497
1498
1499
|
# File 'lib/dhall/ast.rb', line 1497
def pathname
Pathname.new(".").join(*path)
end
|
#to_s ⇒ Object
1501
1502
1503
|
# File 'lib/dhall/ast.rb', line 1501
def to_s
"./#{pathname}"
end
|