Method: CF::CLI#set_target

Defined in:
lib/cf/cli.rb

#set_target(url) ⇒ Object



318
319
320
321
322
323
324
325
326
# File 'lib/cf/cli.rb', line 318

def set_target(url)
  ensure_config_dir

  File.open(File.expand_path(CF::TARGET_FILE), "w") do |f|
    f.write(sane_target_url(url))
  end

  invalidate_client
end