Cross Reference: parsing_callback.rb
xref
: /
ontohub
/
lib
/
parsing_callback.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
module
ParsingCallback
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
def
self.determine
_for
(
ontology
)
281d3e6504299a65d417a4146c0f670917f3feab
Tim Reddehase
logic_name
=
ontology.logic.to
_s
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
self.constants.each
do
|
constant
|
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
moddule
=
self.const
_get
(
constant
)
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
if
moddule.class
==
Module
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
if
moddule.defined
_for
?
(
logic_name
)
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
return
moddule.const
_get
(:
Callback
)
.
new
(
ontology
)
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
end
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
end
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
end
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
GenericCallback.new
(
ontology
)
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
end
5f17dd3e3fd2fe31bb8ad69cc23c49a5fcceb39d
Tim Reddehase
end