diff options
author | Christoph Helma <helma@in-silico.de> | 2009-09-10 15:20:28 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-09-10 15:20:28 +0200 |
commit | 285daeaafa3bdff027bc068be9a13232fca3e35d (patch) | |
tree | d1769b40c7bbf4738502ae947c41129e1a749af0 | |
parent | 6a2c3f2100d030c30b7d8ac8c95dcece7edb040c (diff) |
Version bump to 1.0.0
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | lib/opentox.rb | 28 |
2 files changed, 29 insertions, 1 deletions
@@ -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 + |