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
1050
1051
1052
|
# File 'lib/dhall/ast.rb', line 1050
def self.as_dhall
Builtins[:Integer]
end
|
Instance Method Details
#===(other) ⇒ Object
1062
1063
1064
|
# File 'lib/dhall/ast.rb', line 1062
def ===(other)
self == other || value === other
end
|
#as_json ⇒ Object
1066
1067
1068
|
# File 'lib/dhall/ast.rb', line 1066
def as_json
[16, value]
end
|
#to_i ⇒ Object
1058
1059
1060
|
# File 'lib/dhall/ast.rb', line 1058
def to_i
value
end
|
#to_s ⇒ Object
1054
1055
1056
|
# File 'lib/dhall/ast.rb', line 1054
def to_s
"#{value >= 0 ? "+" : ""}#{value}"
end
|