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

#_create_accessor, #_merge_object!, #rfm_filter, #rfm_only, #to_cih

Instance Method Details

#[](*args) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/rfm/utilities/factory.rb', line 20

def [](*args)
	options = Factory.get_config(*args)
	host = options[:strings].delete_at(0) || options[:host]
  super(host) || (self[host] = Rfm::Server.new(*args))   #(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