416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
|
# File 'lib/support/orientquery.rb', line 416
def target arg = nil
if arg.present?
@q[:database] = arg
self elsif @q[:database].present?
the_argument = @q[:database]
case @q[:database]
when ActiveOrient::Model the_argument.rrid
when self.class ' ( '+ the_argument.compose + ' ) '
when Class
the_argument.ref_name
else
if the_argument.to_s.rid? the_argument
else the_argument.to_s
end
end
else
raise "cannot complete until a target is specified"
end
end
|