Class: VBox::WebService::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/virtualbox/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration



9
10
11
12
13
14
15
16
17
# File 'lib/virtualbox/configuration.rb', line 9

def initialize
  @vboxweb_host = ENV['VBOXWEB_HOST'] || '127.0.0.1'
  @vboxweb_port = ENV['VBOXWEB_PORT'] || '18083'
  @vboxweb_user = ENV['VBOXWEB_USER']
  @vboxweb_pass = ENV['VBOXWEB_PASS']
  @log_level = ENV['VBOXWEB_LOGGING'] || 'ERROR'
  @logger = Logger.new(STDOUT)
  @logger.level = Logger.const_get(@log_level)
end

Instance Attribute Details

#log_levelObject

Returns the value of attribute log_level.



7
8
9
# File 'lib/virtualbox/configuration.rb', line 7

def log_level
  @log_level
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/virtualbox/configuration.rb', line 7

def logger
  @logger
end

#vboxweb_hostObject

Returns the value of attribute vboxweb_host.



7
8
9
# File 'lib/virtualbox/configuration.rb', line 7

def vboxweb_host
  @vboxweb_host
end

#vboxweb_passObject

Returns the value of attribute vboxweb_pass.



7
8
9
# File 'lib/virtualbox/configuration.rb', line 7

def vboxweb_pass
  @vboxweb_pass
end

#vboxweb_portObject

Returns the value of attribute vboxweb_port.



7
8
9
# File 'lib/virtualbox/configuration.rb', line 7

def vboxweb_port
  @vboxweb_port
end

#vboxweb_userObject

Returns the value of attribute vboxweb_user.



7
8
9
# File 'lib/virtualbox/configuration.rb', line 7

def vboxweb_user
  @vboxweb_user
end