Method: Ftl::Client#initialize

Defined in:
lib/ftl/client.rb

#initialize(args = nil, opts = {}) ⇒ Client



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ftl/client.rb', line 43

def initialize(args=nil, opts={})
  if args && args.length > 0
    arg = args.reverse.pop
    @args = [arg, args - [arg]]
    load_config(opts)
    if (!SINGLE_COMMANDS.include?(arg))
      @con = Fog::Compute.new(:provider => 'AWS', :aws_secret_access_key => options['SECRET_ACCESS_KEY'], :aws_access_key_id => options['ACCESS_KEY_ID'])
    end
    send(*@args)
  else
    Ftl.help
  end
end