Class: Dhall::Integer

Inherits:
Expression show all
Defined in:
lib/dhall/ast.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#&, #*, #+, #annotate, #as_dhall, #cache_key, #call, #concat, decode, #deep_merge, #deep_merge_type, #dhall_eq, #digest, #fetch, #fusion, #merge, #normalize, #resolve, #shift, #slice, #substitute, #to_binary, #to_cbor, #to_proc, #|

Class Method Details

.as_dhallObject



1187
1188
1189
# File 'lib/dhall/ast.rb', line 1187

def self.as_dhall
	Builtins[:Integer]
end

Instance Method Details

#===(other) ⇒ Object



1199
1200
1201
# File 'lib/dhall/ast.rb', line 1199

def ===(other)
	self == other || value === other
end

#as_jsonObject



1203
1204
1205
# File 'lib/dhall/ast.rb', line 1203

def as_json
	[16, value]
end

#to_iObject



1195
1196
1197
# File 'lib/dhall/ast.rb', line 1195

def to_i
	value
end

#to_sObject



1191
1192
1193
# File 'lib/dhall/ast.rb', line 1191

def to_s
	"#{value >= 0 ? "+" : ""}#{value}"
end