class Dhallish::Function

To be used as Dhallish::Value.val for dhall-defined functions

Attributes

argname[RW]
ast[RW]
ctx[RW]

Public Class Methods

new(argname, ast, ctx) click to toggle source
# File lib/types.rb, line 325
def initialize(argname, ast, ctx)
        @argname = argname
        @ast = ast
        @ctx = ctx
end

Public Instance Methods

call(arg) click to toggle source
# File lib/types.rb, line 331
def call(arg)
        newctx = Context.new ctx
        newctx[@argname] = arg
        @ast.evaluate newctx
end