Cross Reference: parsing_callback.rb
xref
: /
ontohub
/
lib
/
parsing_callback.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
parsing_callback.rb revision 5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
# enforce eager-loading of parsing classes
Dir.glob
(
Rails.root
+
'
lib
/
parsing_callback
/*.rb'
)
.
each
do
|
file
|
require
file
end
module
ParsingCallback
def
self.determine
_for
(
ontology
)
logic_name
=
ontology.logic.name
self.constants.each
do
|
constant
|
moddule
=
self.const
_get
(
constant
)
if
moddule.class
==
Module
if
moddule.defined
_for
?
(
logic_name
)
return
moddule.const
_get
(:
Callback
)
.
new
(
ontology
)
end
end
end
GenericCallback.new
(
ontology
)
end
end