class IcAgent::Candid::EmptyClass

Represents an IDL Empty, a type which has no inhabitants.

Public Class Methods

new() click to toggle source
Calls superclass method IcAgent::Candid::PrimitiveType::new
# File lib/ic_agent/candid.rb, line 212
def initialize
  super
end

Public Instance Methods

covariant(x) click to toggle source
# File lib/ic_agent/candid.rb, line 216
def covariant(x)
  false
end
decode_value(b, t) click to toggle source
# File lib/ic_agent/candid.rb, line 228
def decode_value(b, t)
  raise ValueError, 'Empty cannot appear as an output'
end
encode_type(type_table = nil) click to toggle source
# File lib/ic_agent/candid.rb, line 224
def encode_type(type_table = nil)
  LEB128.encode_signed(TypeIds::Empty).string
end
encode_value(val) click to toggle source
# File lib/ic_agent/candid.rb, line 220
def encode_value(val)
  raise ValueError, 'Empty cannot appear as a function argument'
end
id() click to toggle source
# File lib/ic_agent/candid.rb, line 236
def id
  TypeIds::Empty
end
name() click to toggle source
# File lib/ic_agent/candid.rb, line 232
def name
  'empty'
end