Class: Dhall::Integer

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

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, #|

Instance Method Details

#===(other) ⇒ Object



965
966
967
# File 'lib/dhall/ast.rb', line 965

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

#as_jsonObject



969
970
971
# File 'lib/dhall/ast.rb', line 969

def as_json
  [16, value]
end

#to_iObject



961
962
963
# File 'lib/dhall/ast.rb', line 961

def to_i
  value
end

#to_sObject



957
958
959
# File 'lib/dhall/ast.rb', line 957

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