Class: Dhall::Import::Path
- Inherits:
-
Object
- Object
- Dhall::Import::Path
show all
- Defined in:
- lib/dhall/ast.rb,
lib/dhall/binary.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(*path) ⇒ Path
Returns a new instance of Path.
1432
1433
1434
|
# File 'lib/dhall/ast.rb', line 1432
def initialize(*path)
super(path: path)
end
|
Class Method Details
.decode(*args) ⇒ Object
242
243
244
|
# File 'lib/dhall/binary.rb', line 242
def self.decode(*args)
new(*args)
end
|
Instance Method Details
#as_json ⇒ Object
1473
1474
1475
|
# File 'lib/dhall/ast.rb', line 1473
def as_json
path
end
|
#canonical ⇒ Object
1453
1454
1455
|
# File 'lib/dhall/ast.rb', line 1453
def canonical
self.class.from_string(pathname.cleanpath)
end
|
#location ⇒ Object
1469
1470
1471
|
# File 'lib/dhall/ast.rb', line 1469
def location
Union.from(Location, "Local", to_s.as_dhall)
end
|
#origin ⇒ Object
1461
1462
1463
|
# File 'lib/dhall/ast.rb', line 1461
def origin
"localhost"
end
|
#resolve(resolver) ⇒ Object
1457
1458
1459
|
# File 'lib/dhall/ast.rb', line 1457
def resolve(resolver)
resolver.resolve_path(self)
end
|
#to_s ⇒ Object
1465
1466
1467
|
# File 'lib/dhall/ast.rb', line 1465
def to_s
pathname.to_s
end
|
#with(path:) ⇒ Object
1436
1437
1438
|
# File 'lib/dhall/ast.rb', line 1436
def with(path:)
self.class.new(*path)
end
|