Class: IcAgent::Candid::NullClass
Overview
Represents an IDL Null check None == Null ?
Instance Method Summary
collapse
#_build_type_table_impl, #check_type
Methods inherited from BaseType
_build_type_table_impl, #build_type_table, check_type, covariant, decode_value, #display, encode_type, encode_value
Constructor Details
Returns a new instance of NullClass.
180
181
182
|
# File 'lib/ic_agent/candid.rb', line 180
def initialize()
super
end
|
Instance Method Details
#covariant(x) ⇒ Object
184
185
186
|
# File 'lib/ic_agent/candid.rb', line 184
def covariant(x)
x == nil
end
|
#decode_value(b, t) ⇒ Object
196
197
198
199
|
# File 'lib/ic_agent/candid.rb', line 196
def decode_value(b, t)
check_type(t)
return nil
end
|
#encode_type(type_table = nil) ⇒ Object
192
193
194
|
# File 'lib/ic_agent/candid.rb', line 192
def encode_type(type_table = nil)
LEB128.encode_signed(TypeIds::Null).string
end
|
#encode_value(val) ⇒ Object
188
189
190
|
# File 'lib/ic_agent/candid.rb', line 188
def encode_value(val)
''
end
|
#id ⇒ Object
205
206
207
|
# File 'lib/ic_agent/candid.rb', line 205
def id
TypeIds::Null
end
|
#name ⇒ Object
201
202
203
|
# File 'lib/ic_agent/candid.rb', line 201
def name
'null'
end
|