summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+