class Dhall::FunctionProxyRaw

Public Class Methods

new(callable, curry: true) click to toggle source
# File lib/dhall/ast.rb, line 248
def initialize(callable, curry: true)
        @callable = if !curry
                callable
        elsif callable.respond_to?(:curry)
                callable.curry
        elsif callable.respond_to?(:to_proc)
                callable.to_proc.curry
        else
                callable.method(:call).to_proc.curry
        end
end

Public Instance Methods

as_json() click to toggle source
# File lib/dhall/ast.rb, line 264
def as_json
        raise "Cannot serialize #{self}"
end
call(*args, &block) click to toggle source
# File lib/dhall/ast.rb, line 260
def call(*args, &block)
        RubyObjectRaw.new(@callable.call(*args.map { |arg| arg&.as_dhall }, &block))
end
normalize() click to toggle source
# File lib/dhall/normalize.rb, line 143
def normalize
        self
end
shift(*) click to toggle source
# File lib/dhall/normalize.rb, line 135
def shift(*)
        self
end
substitute(*) click to toggle source
# File lib/dhall/normalize.rb, line 139
def substitute(*)
        raise "Cannot substitute #{self}"
end