Class: OvirtSDK4::IconService
- Inherits:
-
Service
- Object
- Service
- OvirtSDK4::IconService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary (collapse)
-
- (Icon) get(opts = {})
Returns the representation of the object managed by this service.
-
- (Service) service(path)
Locates the service corresponding to the given path.
-
- (String) to_s
Returns an string representation of this service.
Instance Method Details
- (Icon) get(opts = {})
Returns the representation of the object managed by this service.
10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 |
# File 'lib/ovirtsdk4/services.rb', line 10257 def get(opts = {}) query = {} request = Request.new(:method => :GET, :path => @path, :query => query) response = @connection.send(request) case response.code when 200 begin reader = XmlReader.new(response.body) return IconReader.read_one(reader) ensure reader.close end else check_fault(response) end end |
- (Service) service(path)
Locates the service corresponding to the given path.
10281 10282 10283 10284 10285 10286 |
# File 'lib/ovirtsdk4/services.rb', line 10281 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
- (String) to_s
Returns an string representation of this service.
10293 10294 10295 |
# File 'lib/ovirtsdk4/services.rb', line 10293 def to_s return "#<#{IconService}:#{@path}>" end |