summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2009-09-10 15:20:28 +0200
committerChristoph Helma <helma@in-silico.de>2009-09-10 15:20:28 +0200
commit285daeaafa3bdff027bc068be9a13232fca3e35d (patch)
treed1769b40c7bbf4738502ae947c41129e1a749af0
parent6a2c3f2100d030c30b7d8ac8c95dcece7edb040c (diff)
Version bump to 1.0.0
-rw-r--r--VERSION2
-rw-r--r--lib/opentox.rb28
2 files changed, 29 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index ee1372d..3eefcb9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2.2
+1.0.0
diff --git a/lib/opentox.rb b/lib/opentox.rb
new file mode 100644
index 0000000..1a12123
--- /dev/null
+++ b/lib/opentox.rb
@@ -0,0 +1,28 @@
+module OpenTox
+
+ class OpenTox
+ attr_accessor :uri
+
+ def initialize(uri)
+ @uri = uri
+ end
+
+ # Get the object name
+ def name
+ RestClient.get @uri + '/name'
+ end
+
+ # Deletes an object
+ def destroy
+ RestClient.delete @uri
+ end
+
+ # Object path without hostname
+ def path
+ URI.split(@uri)[5]
+ end
+
+ end
+
+end
+