Module: Heroku::Scalr

Extended by:
Scalr
Included in:
Scalr
Defined in:
lib/heroku/scalr/cli.rb,
lib/heroku/scalr.rb

Defined Under Namespace

Modules: Metric Classes: App, CLI, Config, Runner

Instance Method Summary collapse

Instance Method Details

#configure(opts = {}) ⇒ Object

Parameters:

  • opts (Hash) (defaults to: {})


18
19
20
21
22
# File 'lib/heroku/scalr.rb', line 18

def configure(opts = {})
  @logger = Logger.new(opts[:log_file]) if opts[:log_file]
  logger.level = opts[:log_level] if opts[:log_level]
  self
end

#loggerLogger

Returns the logger instance.

Returns:

  • (Logger)

    the logger instance



25
26
27
# File 'lib/heroku/scalr.rb', line 25

def logger
  @logger ||= Logger.new(STDOUT)
end

#run!(*args) ⇒ Object



11
12
13
# File 'lib/heroku/scalr.rb', line 11

def run!(*args)
  Heroku::Scalr::Runner.new(*args).run!
end