class Dhall::Merge
Public Class Methods
decode(record, input, type=nil)
click to toggle source
# File lib/dhall/binary.rb, line 126 def self.decode(record, input, type=nil) new( record: Dhall.decode(record), input: Dhall.decode(input), type: type.nil? ? nil : Dhall.decode(type) ) end
Public Instance Methods
as_json()
click to toggle source
# File lib/dhall/ast.rb, line 651 def as_json [6, record.as_json, input.as_json] + (type.nil? ? [] : [type.as_json]) end
normalize()
click to toggle source
Calls superclass method
Dhall::Expression#normalize
# File lib/dhall/normalize.rb, line 299 def normalize normalized = super if normalized.record.is_a?(Record) && normalized.input.is_a?(Union) fetched = normalized.record.fetch(normalized.input.tag) value = normalized.input.value value.nil? ? fetched : fetched.call(value) else normalized end end