# File lib/ruby-vpi/vpi.rb, line 237
237:     def method_missing aMeth, *aArgs, &aBlockArg
238:       if child = vpi_handle_by_name(aMeth.to_s, self)
239:         # cache the child for future accesses, in order to cut down number of calls to method_missing
240:           (class << self; self; end).class_eval do
241:             define_method aMeth do
242:               child
243:             end
244:           end
245: 
246:         child
247: 
248:       else
249:         prop = @@propCache[aMeth]
250: 
251:         if prop.operation
252:           self.send(prop.operation, prop.type, *aArgs, &aBlockArg)
253: 
254:         else
255:           case prop.accessor
256:             when :d     # delay values
257:               raise NotImplementedError, 'processing of delay values is not yet implemented.'
258:               # TODO: vpi_put_delays
259:               # TODO: vpi_get_delays
260: 
261:             when :l     # logic values
262:               if prop.assignment
263:                 value = aArgs.shift
264:                 put_value(value, prop.type, *aArgs)
265:               else
266:                 get_value(prop.type)
267:               end
268: 
269:             when :i     # integer values
270:               vpi_get(prop.type, self) unless prop.assignment
271: 
272:             when :b # boolean values
273:               unless prop.assignment
274:                 value = vpi_get(prop, self)
275:                 value && (value != 0)   # zero is false in C
276:               end
277: 
278:             when :s     # string values
279:               vpi_get_str(prop.type, self) unless prop.assignment
280: 
281:             when :h     # handle values
282:               vpi_handle(prop.type, self) unless prop.assignment
283: 
284:             else
285:               raise NoMethodError, "unable to access VPI property #{prop.name.inspect} through method #{aMeth.inspect} with arguments #{aArgs.inspect} for handle #{self}"
286:           end
287:         end
288:       end
289:     end