class Dhall::EmptyList

Public Class Methods

decode(type) click to toggle source
# File lib/dhall/binary.rb, line 98
def self.decode(type)
        EmptyList.new(type: Dhall.decode(type))
end
new(attrs) click to toggle source
Calls superclass method Dhall::List::new
# File lib/dhall/ast.rb, line 510
def initialize(attrs)
        if attrs.key?(:element_type)
                et = attrs.delete(:element_type)
                attrs[:type] = self.class.as_dhall.call(et) if et
        end

        super
end

Public Instance Methods

[](_) click to toggle source
# File lib/dhall/ast.rb, line 541
def [](_)
        OptionalNone.new(value_type: element_type)
end
as_json() click to toggle source
# File lib/dhall/ast.rb, line 519
def as_json
        [4, element_type.as_json]
rescue
        [28, type.as_json]
end
concat(other) click to toggle source
# File lib/dhall/ast.rb, line 561
def concat(other)
        other
end
each() click to toggle source
# File lib/dhall/ast.rb, line 529
def each
        self
end
first() click to toggle source
# File lib/dhall/ast.rb, line 545
def first
        OptionalNone.new(value_type: element_type)
end
join(*) click to toggle source
# File lib/dhall/ast.rb, line 557
def join(*)
        ""
end
last() click to toggle source
# File lib/dhall/ast.rb, line 549
def last
        OptionalNone.new(value_type: element_type)
end
length() click to toggle source
# File lib/dhall/ast.rb, line 537
def length
        0
end
map(type: nil) click to toggle source
# File lib/dhall/ast.rb, line 525
def map(type: nil)
        type.nil? ? self : with(element_type: type)
end
normalize() click to toggle source
Calls superclass method Dhall::Expression#normalize
# File lib/dhall/normalize.rb, line 263
def normalize
        super.with(type: type.normalize)
end
reduce(z) click to toggle source
# File lib/dhall/ast.rb, line 533
def reduce(z)
        z
end
reverse() click to toggle source
# File lib/dhall/ast.rb, line 553
def reverse
        self
end