Class: Dhall::ExpressionResolver::ImportResolver
Class Method Summary
collapse
Instance Method Summary
collapse
for, #initialize, register_for
Instance Method Details
#resolve(resolver:, relative_to:) ⇒ Object
442
443
444
445
446
447
448
|
# File 'lib/dhall/resolve.rb', line 442
def resolve(resolver:, relative_to:)
Promise.resolve(nil).then do
resolver.cache_fetch(@expr.cache_key(relative_to)) do
resolve_raw(resolver: resolver, relative_to: relative_to)
end
end
end
|
#resolve_raw(resolver:, relative_to:) ⇒ Object
450
451
452
453
454
455
456
457
458
459
460
|
# File 'lib/dhall/resolve.rb', line 450
def resolve_raw(resolver:, relative_to:)
real_path = @expr.real_path(relative_to)
real_path.resolve(resolver).then do |result|
@expr.parse_resolve_check(
result,
deadline: resolver.deadline,
resolver: resolver.child(real_path),
relative_to: real_path
)
end
end
|