class Dhallish::Ast::RecordNode
`hash` shall map Keys to Ast-Nodes
Attributes
hash[RW]
Public Class Methods
new(hash)
click to toggle source
# File lib/ast.rb, line 378 def initialize(hash) @hash = hash end
Public Instance Methods
compute_type(ctx)
click to toggle source
# File lib/ast.rb, line 382 def compute_type(ctx) types = {} @hash.each { |name, expr| types[name] = expr.compute_type ctx } Types::Record.new types end
evaluate(ctx)
click to toggle source
# File lib/ast.rb, line 390 def evaluate(ctx) vals = {} @hash.each { |key, node| vals[key] = node.evaluate ctx } vals end