Class: Cheri::Explorer::NameTypeValue

Inherits:
NameValue
  • Object
show all
Defined in:
lib/cheri/explorer/explorer.rb

Overview

NameValue

Instance Method Summary collapse

Methods inherited from NameValue

#<=>, #id, #name, #value

Constructor Details

#initialize(name, type, value) ⇒ NameTypeValue

Returns a new instance of NameTypeValue.



219
220
221
222
223
# File 'lib/cheri/explorer/explorer.rb', line 219

def initialize(name,type,value)
  super(name,value)
  @t = String === type ? type : (type.to_s rescue '?')
  @d = type.__id__ rescue nil
end

Instance Method Details

#to_aObject Also known as: to_ary



230
231
232
# File 'lib/cheri/explorer/explorer.rb', line 230

def to_a
  [@n,@t,@v,@i]  
end

#typeObject



224
225
226
# File 'lib/cheri/explorer/explorer.rb', line 224

def type
  @t  
end

#type_idObject



227
228
229
# File 'lib/cheri/explorer/explorer.rb', line 227

def type_id
  @d
end