Module: SAWS

Extended by:
SAWS
Included in:
SAWS
Defined in:
lib/saws.rb

Defined Under Namespace

Modules: CLI Classes: Base, RDS

Instance Method Summary collapse

Instance Method Details

#connection_optionsObject



29
30
31
# File 'lib/saws.rb', line 29

def connection_options
  @connection_options ||= CLI.options.slice(:region, :aws_access_key_id, :aws_secret_access_key)
end

#log(message) ⇒ Object



33
34
35
# File 'lib/saws.rb', line 33

def log(message)
  logger.info message if logger
end

#loggerObject



20
21
22
23
24
25
26
27
# File 'lib/saws.rb', line 20

def logger
  @logger ||= case CLI.options[:log_file]
  when "STDOUT"
    Logger.new STDOUT
  when String
    Logger.new CLI.options[:log_file]
  end
end