class Dhall::Import::Path
Public Class Methods
decode(*args)
click to toggle source
# File lib/dhall/binary.rb, line 248 def self.decode(*args) new(*args) end
from_string(s)
click to toggle source
# File lib/dhall/ast.rb, line 1490 def self.from_string(s) prefix, *suffix = s.to_s.split(/\//) if prefix == "" AbsolutePath.new(*suffix) elsif prefix == "~" RelativeToHomePath.new(*suffix) elsif prefix == ".." RelativeToParentPath.new(*suffix) else RelativePath.new(prefix, *suffix) end end
new(*path)
click to toggle source
Calls superclass method
# File lib/dhall/ast.rb, line 1482 def initialize(*path) super(path: path) end
Public Instance Methods
as_json()
click to toggle source
# File lib/dhall/ast.rb, line 1523 def as_json path end
canonical()
click to toggle source
# File lib/dhall/ast.rb, line 1503 def canonical self.class.from_string(pathname.cleanpath) end
location()
click to toggle source
# File lib/dhall/ast.rb, line 1519 def location Union.from(Location, "Local", to_s.as_dhall) end
origin()
click to toggle source
# File lib/dhall/ast.rb, line 1511 def origin "localhost" end
resolve(resolver)
click to toggle source
# File lib/dhall/ast.rb, line 1507 def resolve(resolver) resolver.resolve_path(self) end
to_s()
click to toggle source
# File lib/dhall/ast.rb, line 1515 def to_s pathname.to_s end
with(path:)
click to toggle source
# File lib/dhall/ast.rb, line 1486 def with(path:) self.class.new(*path) end