diff options
-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 + |