From 285daeaafa3bdff027bc068be9a13232fca3e35d Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 10 Sep 2009 15:20:28 +0200 Subject: Version bump to 1.0.0 --- lib/opentox.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/opentox.rb (limited to 'lib/opentox.rb') 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 + -- cgit v1.2.3