Class: Dhall::OptionalNone
- Inherits:
-
Optional
show all
- Defined in:
- lib/dhall/ast.rb,
lib/dhall/normalize.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Optional
decode, for, #initialize, #type
Methods inherited from Expression
#&, #*, #+, #annotate, #as_dhall, #cache_key, #call, #concat, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #fusion, #merge, #resolve, #shift, #slice, #substitute, #to_binary, #to_cbor, #to_proc, #|
Class Method Details
.as_dhall ⇒ Object
620
621
622
|
# File 'lib/dhall/ast.rb', line 620
def self.as_dhall
Builtins[:None]
end
|
Instance Method Details
#as_json ⇒ Object
636
637
638
639
640
641
|
# File 'lib/dhall/ast.rb', line 636
def as_json
Application.new(
function: self.class.as_dhall,
argument: value_type
).as_json
end
|
#map(type: nil) ⇒ Object
624
625
626
|
# File 'lib/dhall/ast.rb', line 624
def map(type: nil)
type.nil? ? self : with(value_type: type)
end
|
#normalize ⇒ Object
279
280
281
|
# File 'lib/dhall/normalize.rb', line 279
def normalize
with(value_type: value_type.normalize)
end
|
#reduce(z) ⇒ Object
628
629
630
|
# File 'lib/dhall/ast.rb', line 628
def reduce(z)
z
end
|
#to_s ⇒ Object
632
633
634
|
# File 'lib/dhall/ast.rb', line 632
def to_s
""
end
|