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

#&, #*, #+, #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



1138
1139
1140
# File 'lib/dhall/ast.rb', line 1138

def self.as_dhall
	Builtins[:Integer]
end

Instance Method Details

#===(other) ⇒ Object



1150
1151
1152
# File 'lib/dhall/ast.rb', line 1150

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

#as_jsonObject



1154
1155
1156
# File 'lib/dhall/ast.rb', line 1154

def as_json
	[16, value]
end

#to_iObject



1146
1147
1148
# File 'lib/dhall/ast.rb', line 1146

def to_i
	value
end

#to_sObject



1142
1143
1144
# File 'lib/dhall/ast.rb', line 1142

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