summaryrefslogtreecommitdiff
path: root/lib/opentox.rb
blob: 9b1226be3f0957db7b6141628598c5ba48a6c9de (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
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