From 2806bfff8a01f75351f31c5bd676b25b2fb36017 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Wed, 11 Aug 2010 08:46:45 +0200 Subject: add generic algorithm object --- lib/algorithm.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/algorithm.rb') 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 -- cgit v1.2.3