<< Masa.20100920-trace-limitationText-object | 2010 | Masa.20100916-understand-limitation-process >>
suspend
14:30
ydpm:mhatakeyama@setting-up-ch.oddb> e -> undefined method `>' for nil:NilClass status: started: setting-up-ch.oddb - paused: setting-up-ch.oddb
Suspend
Source
src/model/limitationtext.rb
#!/usr/bin/env ruby # LimitationText -- oddb -- 10.11.2003 -- mhuggler@ywesee.com require 'util/language' module ODDB class LimitationText include SimpleLanguage ODBA_SERIALIZABLE = [ '@descriptions' ] attr_accessor :code, :type, :niveau, :value, :valid_from end end
BraSt
Where is SimpleLanguage module
masa@masa ~/ywesee/oddb.org $ grep -r "module SimpleLanguage" src src/util/language.rb: module SimpleLanguage
Check SimpleLanguage module
src/util/language.rb
Notes
masa@masa ~/ywesee/oddb.org $ grep -r "module Persistence" src src/util/persistence.rb: module PersistenceMethods src/util/persistence.rb: module Persistence
Check all the methods in SimpleLanguage module
src/util/language.rb
Experiment
masa@masa ~/ywesee/oddb.org/src/util $ ruby add_caller.rb language.rb
add_caller.b
require 'fileutils' flag = false FileUtils.mv(ARGV[0], ARGV[0] + ".bak") open(ARGV[0],"w") do |out| File.readlines(ARGV[0]+".bak").each do |line| if flag out.print "p caller(0).first\n" flag = false end if line =~ /def / flag = true end out.print line end end
Result
"/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:22:in `first'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'" "/home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing'" "/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description'" "/home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions'"
BraSt
Exeriment
masa@masa ~/ywesee/oddb.org/src/util $ ruby add_caller.rb language.rb
add_caller.b
require 'fileutils' insert_line = 'print caller(0).first.to_s + "\t of " + self.class.to_s + " class\n"' flag = false FileUtils.mv(ARGV[0], ARGV[0] + ".bak") open(ARGV[0],"w") do |out| File.readlines(ARGV[0]+".bak").each do |line| if flag out.print insert_line, "\n" flag = false end if line =~ /def / flag = true end out.print line end end
Result
/home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::AtcClass class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::AtcClass class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::AtcClass class /home/masa/ywesee/oddb.org/src/util/language.rb:22:in `first' of ODDB::SimpleLanguage::Descriptions class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:43:in `match' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicGroup class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::GalenicForm class /home/masa/ywesee/oddb.org/src/util/language.rb:56:in `respond_to?' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Substance class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::CommercialForm class /home/masa/ywesee/oddb.org/src/util/language.rb:47:in `method_missing' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:31:in `description' of ODDB::Indication class /home/masa/ywesee/oddb.org/src/util/language.rb:35:in `descriptions' of ODDB::Indication class
Consideration
There is not ODDB::LimitationText
Experiment
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb
masa@masa /usr/lib64/ruby/site_ruby/1.8/odba $ sudo ruby add_caller.rb persistable.rb
add_caller.rb
require 'fileutils' insert_line = 'print caller(0).first.to_s + "\t of " + self.class.to_s + " class\n" if self.class.to_s =~ /LimitationText/' flag = false FileUtils.mv(ARGV[0], ARGV[0] + ".bak") open(ARGV[0],"w") do |out| File.readlines(ARGV[0]+".bak").each do |line| if flag out.print insert_line, "\n" flag = false end if line =~ /def / flag = true end out.print line end end
Result
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:375:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:332:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:316:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:375:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:332:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:316:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:375:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:332:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:316:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:375:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:332:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:316:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class
Some minutes later
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:496:in `odba_unsaved?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class
Consideration
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:375:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:332:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:316:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:280:in `odba_id' of ODDB::LimitationText class
Experiment Show odba_id /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb
def odba_id @odba_id ||= ODBA.cache.next_id #print caller(0).first.to_s + "\t of " + self.class.to_s + " class\n" if self.class.to_s =~ /LimitationText/ if self.class.to_s =~ /LimitationText/ print caller(0).first.to_s + "\t of " + self.class.to_s + " class\n" print "@odba_id=", @odba_id, "\n" end return @odba_id end
Result
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899116 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899116 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899116 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:283:in `odba_id' of ODDB::LimitationText class @odba_id=10899116
Consider
Experiment src/view/dataformat.rb
def name_base(model, session=@session) ## optimization: there is a new Instance of the including Component for ## each new query. Therefore it should be _much_ faster to have an ## instance variable @query than to call @session.persistent_user_input ## for every line in a result @query ||= @session.persistent_user_input(:search_query) @type ||= @session.persistent_user_input(:search_type) link = HtmlGrid::Link.new(:compare, model, session, self) args = [ :pointer, model.pointer, :search_type, @type, :search_query, @query, ] if (ean_code = model.barcode) pp model.limitation_text
Result
#<ODDB::LimitationText:0x7fe23d332be8 @odba_class=nil, @odba_container=nil, @odba_id=10899115, @receiver=nil, @receiver_loaded=nil> nil #<ODDB::LimitationText:0x7fe23d28f948 @odba_class=nil, @odba_container=nil, @odba_id=23135746, @receiver=nil, @receiver_loaded=nil> #<ODDB::LimitationText:0x7fe23d24b540 @odba_class=nil, @odba_container=nil, @odba_id=24323050, @receiver=nil, @receiver_loaded=nil> #<ODDB::LimitationText:0x7fe23d20a1a8 @odba_class=nil, @odba_container=nil, @odba_id=10899116, @receiver=nil, @receiver_loaded=nil> nil
Consideration
where is the @odba_id set?
Experiment
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb
def odba_id if self.class.to_s =~ /LimitationText/ print caller(0).first.to_s + "\t of " + self.class.to_s + " class\n" print "@odba_id=", @odba_id, "\n" end @odba_id ||= ODBA.cache.next_id return @odba_id end
Result
/usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899115 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=23135746 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=24323050 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899116 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:380:in `odba_restore' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899116 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899116 /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:337:in `odba_observers' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:321:in `odba_prefetch?' of ODDB::LimitationText class /usr/lib64/ruby/site_ruby/1.8/odba/persistable.rb:282:in `odba_id' of ODDB::LimitationText class @odba_id=10899116
Consideration
Suspend
I have found "search_oddb" method.
grep search "search_query"
src/custom/lookandfeelbase.rb: :e_search_query_short => 'Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte verwenden Sie mindestens 3 Buchstaben.', src/custom/lookandfeelbase.rb: :search_query => 'HIER Suchbegriff eingeben', src/custom/lookandfeelbase.rb: :e_search_query_short => 'Votre mot clé de recherche donne un résultat très grand. Veuillez utiliser au moins 3 lettres.', src/custom/lookandfeelbase.rb: :search_query => 'ICI entrer le médicament/ principe actif', src/custom/lookandfeelbase.rb: :e_search_query_short => 'Your search string produces a very large search result. Please enter at least 3 letters.', src/custom/lookandfeelbase.rb: :search_query => 'Enter Drug or Active Agent here', src/custom/lookandfeelbase.rb: :search_query => { src/model/search_result.rb: :search_type, :search_query, :limit, :display_limit, :error_limit src/model/search_result.rb: act.same_as?(@search_query) src/state/admin/assign_deprived_sequence.rb: name = @session.user_input(:search_query) src/state/admin/assign_fachinfo.rb: name = @session.user_input(:search_query) src/state/admin/orphaned_fachinfo_assign.rb: name = @session.user_input(:search_query) src/state/admin/orphaned_patinfo_assign.rb: name = @session.user_input(:search_query).to_s src/state/ajax/matches.rb: if (term = @session.user_input(:search_query)) && term.is_a?(String) src/state/ajax/matches.rb: { :search_query => term } src/state/drugs/compare.rb: elsif term = @session.user_input(:search_query) src/state/drugs/payment_method.rb: attr_reader :search_query, :search_type src/state/drugs/payment_method.rb: @search_query = @session.user_input(:search_query) src/state/drugs/register_download.rb: attr_reader :search_query, :search_type src/state/drugs/register_download.rb: @search_query = @session.user_input(:search_query) src/state/drugs/register_download.rb: item.text = [@search_query, stype, 'csv'].join('.') src/state/drugs/register_download.rb: :search_query => @search_query, src/state/drugs/result.rb: attr_accessor :search_query, :search_type src/state/drugs/result.rb: query = @session.persistent_user_input(:search_query).to_s.downcase src/state/drugs/result.rb: _search_drugs(@search_query, "st_sequence") src/state/drugs/result.rb: query = @session.persistent_user_input(:search_query).to_s.downcase src/state/drugs/result.rb: if(@search_type != stype || @search_query != query) src/state/global.rb: query = @session.persistent_user_input(:search_query) src/state/global.rb: :search_query, query) src/state/global.rb: state.search_query = query src/state/substances/substance.rb: @errors.store(:substance_form, create_error('e_search_query_short', src/state/user/download.rb: query = ODDB.search_term(@model.data[:search_query].to_s) src/state/user/download.rb: @model.search_query = query src/util/oddbapp.rb: result.search_query = query src/util/session.rb: @persistent_user_input[:search_query] ||= query src/util/session.rb: @persistent_user_input[:search_query] ||= query src/util/session.rb: @persistent_user_input[:search_query] ||= query src/util/session.rb: @persistent_user_input[:search_query] ||= query src/util/validator.rb: def search_query(value) src/util/validator.rb: raise SBSM::InvalidDataError.new(:e_search_query_short, :search_query, value) src/view/additional_information.rb: query = @session.persistent_user_input(:search_query) src/view/additional_information.rb: :search_query, query.gsub('/', '%2F'), src/view/admin/assign_deprived_sequence.rb: [0,0,0] => :search_query, src/view/admin/assign_deprived_sequence.rb: :search_query => View::SearchBar src/view/admin/assign_fachinfo.rb: [0,0,0] => :search_query, src/view/admin/assign_fachinfo.rb: :search_query => View::SearchBar src/view/admin/orphaned_fachinfo_assign.rb: [0,0,0] => :search_query, src/view/admin/orphaned_fachinfo_assign.rb: :search_query => View::SearchBar src/view/admin/orphaned_patinfo_assign.rb: [0,0,0] => :search_query, src/view/admin/orphaned_patinfo_assign.rb: :search_query => View::SearchBar src/view/analysis/result.rb: [0,0,0] => :search_query, src/view/analysis/result.rb: :search_query => View::SearchBar src/view/analysis/result.rb: query = session.persistent_user_input(:search_query) src/view/centeredsearchform.rb: [0,2,0,1] => :search_query, src/view/centeredsearchform.rb: :search_query => View::SearchBar, src/view/companies/companylist.rb: [1,0,0] => :search_query, src/view/companies/companylist.rb: :search_query => View::SearchBar, src/view/companies/companylist.rb: [1,0,0] => :search_query, src/view/companies/companylist.rb: [0,0,0] => :search_query, src/view/companies/companylist.rb: :search_query => View::SearchBar, src/view/companies/companylist.rb: query = session.persistent_user_input(:search_query) src/view/companies/companylist.rb: [0,0,0] => :search_query, src/view/dataformat.rb: @query ||= @session.persistent_user_input(:search_query) src/view/dataformat.rb: :pointer, model.pointer, :search_type, @type, :search_query, @query, src/view/dataformat.rb: [:search_query, @session.persistent_user_input(:search_query)] src/view/doctors/doctorlist.rb: [0,0,0] => :search_query, src/view/doctors/doctorlist.rb: :search_query => View::SearchBar, src/view/doctors/doctorlist.rb: [0,0,0] => :search_query, src/view/doctors/doctorlist.rb: :search_query => View::SearchBar, src/view/doctors/doctorlist.rb: query = session.persistent_user_input(:search_query) src/view/drugs/atcchooser.rb: {'search_query'=>mdl.code}, src/view/drugs/centeredsearchform.rb: [0,3,0,2] => :search_query, src/view/drugs/centeredsearchform.rb: :search_query => View::SearchBar, src/view/drugs/compare.rb: query = @session.persistent_user_input(:search_query) src/view/drugs/compare.rb: :zone, :drugs, :search_query, query.gsub('/', '%2F'), :search_type, src/view/drugs/compare_search.rb: [0,2] => :search_query, src/view/drugs/compare_search.rb: :search_query => View::AutocompleteSearchBar, src/view/drugs/csv_result.rb: file = "#{@model.search_query}.#{@session.lookandfeel.lookup(@model.search_type)}.csv" src/view/drugs/fachinfos.rb: 'search_query' => model.name_base, src/view/drugs/limitationtexts.rb: 'search_query' => model.name_base, src/view/drugs/minifi.rb: :search_query => @model.name.gsub('/', '%2F')) src/view/drugs/package.rb: :search_query => model.name_base.gsub('/', '%2F'), src/view/drugs/patinfos.rb: 'search_query' => model.name_base, src/view/drugs/payment_method.rb: [:search_query, :search_type].each { |key| src/view/drugs/register_download.rb: [:search_query, :search_type].each { |key| src/view/drugs/result.rb: :search_query => @session.persistent_user_input(:search_query).gsub('/', '%2F'), src/view/drugs/result.rb: [:search_query, :search_type].each { |key| src/view/drugs/result.rb: query = @session.persistent_user_input(:search_query).gsub('/', '%2F') src/view/drugs/result.rb: query = @session.persistent_user_input(:search_query) src/view/drugs/result.rb: query = session.persistent_user_input(:search_query) src/view/drugs/resultlist.rb: args = [ :search_query, code ] src/view/drugs/resultlist.rb: :search_query, @session.persistent_user_input(:search_query).gsub('/', '%2F'), src/view/drugs/resultlist.rb: :search_query => @session.persistent_user_input(:search_query).gsub('/', '%2F'), src/view/drugs/resultlist.rb: :search_query => @session.persistent_user_input(:search_query).gsub('/', '%2F'), src/view/drugs/sequences.rb: 'search_query' => name.gsub('/', '%2F'), src/view/exception.rb: [0,0,0] => :search_query, src/view/exception.rb: :search_query => SearchBar, src/view/hospitals/hospitallist.rb: [0,0,0] => :search_query, src/view/hospitals/hospitallist.rb: :search_query => View::SearchBar, src/view/hospitals/hospitallist.rb: [0,0,0] => :search_query, src/view/hospitals/hospitallist.rb: :search_query => View::SearchBar, src/view/hospitals/hospitallist.rb: query = session.persistent_user_input(:search_query) src/view/interactions/basket.rb: [1,1,0] => :search_query, src/view/interactions/basket.rb: :search_query => View::SearchBar, src/view/interactions/result.rb: [1,1,0] => :search_query, src/view/interactions/result.rb: :search_query => View::SearchBar, src/view/interactions/result.rb: query = session.persistent_user_input(:search_query) src/view/interactions/result.rb: [0,0,0] => :search_query, src/view/interactions/result.rb: :search_query => View::SearchBar, src/view/interactions/result.rb: query = session.persistent_user_input(:search_query) src/view/interactions/resultlist.rb: link.href = @lookandfeel._event_url(:search, 'search_query' => model.name, src/view/migel/result.rb: [0,0,0] => :search_query, src/view/migel/result.rb: :search_query => View::SearchBar, src/view/migel/result.rb: query = session.persistent_user_input(:search_query) src/view/notify_confirm.rb: :search_query => @session.persistent_user_input(:search_query), src/view/rss/fachinfo.rb: :search_query => name.gsub('/', '%2F')) src/view/searchbar.rb: 'searchAttr' => 'search_query', src/view/searchbar.rb: 'value' => @session.persistent_user_input(:search_query) src/view/searchbar.rb: 'idAttribute' => 'search_query', src/view/searchbar.rb: [0,0,0] => :search_query, src/view/searchbar.rb: :search_query => View::SearchBar, src/view/searchbar.rb: [0,0,0] => :search_query, src/view/searchbar.rb: :search_query => View::SearchBar, src/view/substances/result.rb: query = @session.persistent_user_input(:search_query) src/view/substances/result.rb: [0,0,0] => :search_query, src/view/substances/result.rb: :search_query => View::SearchBar, src/view/substances/result.rb: query = @session.persistent_user_input(:search_query) src/view/substances/substances.rb: [1,0] => :search_query, src/view/substances/substances.rb: :search_query => View::SearchBar,
I focus on src/util/oddbapp.rb
Experiment
src/util/oddbapp.rb
def search_oddb(query, lang) # current search_order: # 1. atcless # 2. iksnr or ean13 # 3. atc-code # 4. exact word in sequence name # 5. company-name # 6. substance # 7. indication # 8. sequence result = ODDB::SearchResult.new result.exact = true result.search_query = query p query
Result
"7680382940243"
Consider
Experiment
src/util/oddbapp.rb
if(reg = registration(iksnr)) atc = ODDB::AtcClass.new('n.n.') p atc.package_count atc.sequences = reg.sequences.values p atc.package_count result.atc_classes = [atc] p result.package_count result.search_type = :iksnr #p result.class #pp result.methods.sort p result.package_count #p result.atc_classes.length #p result.atc_classes[0].package_count #p result.atc_classes[0].packages.length #p result.atc_classes[0].packages[0].class #p result.atc_classes[0].packages[0].limitation_text #p result.atc_classes[0].packages[0].barcode #p result.atc_classes[0].packages[0].basename #p result.atc_classes[0].packages[0].name return result
Result
0 6 6 6
Therefore
Experiment
if(reg = registration(iksnr)) atc = ODDB::AtcClass.new('n.n.') atc.sequences = reg.sequences.values p atc.packages.length p atc.sequences.length
Result
6 4
Consideration
Check Ean codes of search result
So
Therefore
Experiment
if(match = @@iks_or_ean.match(query)) iksnr = match[1] if(reg = registration(iksnr)) p reg.class p reg.packages.length p reg.sequences.length
Result
6 4
Therefore
Experiment
if(match = @@iks_or_ean.match(query)) iksnr = match[1] if(reg = registration(iksnr)) reg.packages.each do |pack| p pack.limitation_text end
Result
"" "01.04.10.: Einfache Sedativa/Tranquillantia\n\nGesamthaft zugelassen 120 Punkte. Iniectabilia sine limitatione" "" "01.04.10.: Einfache Sedativa/Tranquillantia\n\nGesamthaft zugelassen 120 Punkte. Iniectabilia sine limitatione" "01.04.10.: Einfache Sedativa/Tranquillantia\n\nGesamthaft zugelassen 120 Punkte. Iniectabilia sine limitatione" "01.04.10.: Einfache Sedativa/Tranquillantia\n\nGesamthaft zugelassen 120 Punkte. Iniectabilia sine limitatione"
Notes