Class: Rfm::Factory::ServerFactory

Inherits:
CaseInsensitiveHash show all
Defined in:
lib/rfm/utilities/factory.rb

Instance Method Summary collapse

Methods inherited from CaseInsensitiveHash

#[]=

Methods inherited from Hash

#rfm_filter, #rfm_only, #to_cih

Instance Method Details

#[](*args) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/rfm/utilities/factory.rb', line 17

def [](*args)
	options = Factory.get_config(*args)
	host = options[:strings].delete_at(0) || options[:host]
  super(host) or (self[host] = Rfm::Server.new(host, options.rfm_filter(:account_name, :password, :delete=>true)))
  # This part reconfigures the named server, if you pass it new config in the [] method.
  # This breaks some specs in all [] methods in Factory. Consider undoing this. See readme-dev.
				#   super(host).config(options) if (options)
				#   super(host)
end