Class: IcAgent::Candid::EmptyClass
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 EmptyClass.
209
210
211
|
# File 'lib/ic_agent/candid.rb', line 209
def initialize
super
end
|
Instance Method Details
#covariant(x) ⇒ Object
213
214
215
|
# File 'lib/ic_agent/candid.rb', line 213
def covariant(x)
false
end
|
#decode_value(b, t) ⇒ Object
225
226
227
|
# File 'lib/ic_agent/candid.rb', line 225
def decode_value(b, t)
raise ValueError, 'Empty cannot appear as an output'
end
|
#encode_type(type_table = nil) ⇒ Object
221
222
223
|
# File 'lib/ic_agent/candid.rb', line 221
def encode_type(type_table = nil)
LEB128.encode_signed(TypeIds::Empty).string
end
|
#encode_value(val) ⇒ Object
217
218
219
|
# File 'lib/ic_agent/candid.rb', line 217
def encode_value(val)
raise ValueError, 'Empty cannot appear as a function argument'
end
|
#id ⇒ Object
233
234
235
|
# File 'lib/ic_agent/candid.rb', line 233
def id
TypeIds::Empty
end
|
#name ⇒ Object
229
230
231
|
# File 'lib/ic_agent/candid.rb', line 229
def name
'empty'
end
|