Class: VBox::WebsessionManager

Inherits:
Base
  • Object
show all
Defined in:
lib/virtualbox/classes/websession_manager.rb

Instance Attribute Summary

Attributes inherited from Base

#ref

Instance Method Summary collapse

Methods inherited from Base

#arrayize?, #class_name, class_name, #ensure_hash, #fix_savon_method_name, #fix_savon_tag_name, #method_missing, #process_result, soap_method, #soap_method

Constructor Details

#initializeWebsessionManager

Returns a new instance of WebsessionManager.



4
5
6
7
8
# File 'lib/virtualbox/classes/websession_manager.rb', line 4

def initialize
  WebService.connect
  @ref = nil
  require_rel 'classes'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class VBox::Base

Instance Method Details

#_thisObject



10
11
12
13
14
# File 'lib/virtualbox/classes/websession_manager.rb', line 10

def _this
  _this = {}
  _this[:ref_i_virtual_box] = @ref
  _this
end

#logoffObject



25
26
27
28
# File 'lib/virtualbox/classes/websession_manager.rb', line 25

def logoff
  WebService.send_request(:i_websession_manager_logoff, _this)
  @ref = nil
end

#logonObject

Methods



18
19
20
21
22
23
# File 'lib/virtualbox/classes/websession_manager.rb', line 18

def logon
  args = Hash[:username => WebService.configuration.vboxweb_user,
              :password => WebService.configuration.vboxweb_pass]
  @ref = WebService.send_request(:i_websession_manager_logon, args)
  VirtualBox.new(@ref)
end