Class: Dhall::Integer
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Expression
#&, #*, #+, #as_dhall, #cache_key, #call, #concat, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #fusion, #merge, #normalize, #resolve, #shift, #slice, #substitute, #to_cbor, #to_proc, #|
Class Method Details
.as_dhall ⇒ Object
973
974
975
|
# File 'lib/dhall/ast.rb', line 973
def self.as_dhall
Builtins[:Integer]
end
|
Instance Method Details
#===(other) ⇒ Object
985
986
987
|
# File 'lib/dhall/ast.rb', line 985
def ===(other)
self == other || value === other
end
|
#as_json ⇒ Object
989
990
991
|
# File 'lib/dhall/ast.rb', line 989
def as_json
[16, value]
end
|
#to_i ⇒ Object
981
982
983
|
# File 'lib/dhall/ast.rb', line 981
def to_i
value
end
|
#to_s ⇒ Object
977
978
979
|
# File 'lib/dhall/ast.rb', line 977
def to_s
"#{value >= 0 ? "+" : ""}#{value}"
end
|