diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-08-11 08:46:45 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-08-11 08:46:45 +0200 |
commit | 2806bfff8a01f75351f31c5bd676b25b2fb36017 (patch) | |
tree | 4399d62868335449ba2a4a1af6cb554ecffb458b /lib/algorithm.rb | |
parent | abe51eed641a8cb3532eb7f7c4addfadeb77eb0f (diff) |
add generic algorithm object
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r-- | lib/algorithm.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb index cc06032..30a41e0 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -2,6 +2,25 @@ LOGGER.progname = File.expand_path(__FILE__) module OpenTox module Algorithm + + + class Generic + + attr_accessor :uri, :title, :date + + def self.find(uri) + owl = OpenTox::Owl.from_uri(uri, "Algorithm") + return self.new(owl) + end + + protected + def initialize(owl) + @title = owl.get("title") + @date = owl.get("date") + @uri = owl.uri + end + + end class Fminer |