summaryrefslogtreecommitdiff
path: root/lib/opentox.rb
blob: 1a12123b33b9292ab8440afdc98de9cb386ec5dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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