Module: OpenTox::ClassMethods

Defined in:
lib/opentox.rb

Instance Method Summary collapse

Instance Method Details

#service_uriObject


206
207
208
209
210
211
# File 'lib/opentox.rb', line 206

def service_uri
  service = self.to_s.split('::')[1].downcase
  eval("$#{service}[:uri]")
rescue
  bad_request_error "$#{service}[:uri] variable not set. Please set $#{service}[:uri] or use an explicit uri as first constructor argument "
end

#subjectidObject


212
213
214
# File 'lib/opentox.rb', line 212

def subjectid
  RestClientWrapper.subjectid
end

#subjectid=(subjectid) ⇒ Object


215
216
217
# File 'lib/opentox.rb', line 215

def subjectid=(subjectid)
  RestClientWrapper.subjectid = subjectid
end