lib/proto/command_interface_handler.rb in auser-poolparty-1.3.6 vs lib/proto/command_interface_handler.rb in auser-poolparty-1.3.7
- old
+ new
@@ -6,16 +6,16 @@
cr.command = command
resp = begin
the_cloud = clouds[cld.name]
if the_cloud
if command.include?(".")
- command.split(".").inject([]) do |sum, cmd|
+ command.split(".").inject(the_cloud) do |curr_cloud, cmd|
if cmd.match(/\((.*)\)/)
args = $1
new_cmd = cmd.gsub(args, '').gsub(/\(\)/, '')
- sum = arr.send(new_cmd.to_sym, *args)
+ curr_cloud = curr_cloud.send(new_cmd.to_sym, *args)
else
- sum = arr.send(cmd)
+ curr_cloud = curr_cloud.send(cmd)
end
end
else
the_cloud.send(command.to_sym, *args)
end
\ No newline at end of file