class ProcfileUpstartExporter::Cli

Attributes

creator[RW]
destroyer[RW]

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/procfile_upstart_exporter/cli.rb, line 7
def initialize(*)
  super
  self.creator   = ProcfileUpstartExporter::Creator.new
  self.destroyer = ProcfileUpstartExporter::Destroyer.new
end

Public Instance Methods

create() click to toggle source
# File lib/procfile_upstart_exporter/cli.rb, line 20
def create
  enter_verbose_mode if options[:verbose]
  destroyer.destroy options[:application], options[:path], options[:procfile]
  creator.create options[:application],
                 options[:procfile],
                 options[:log],
                 options[:environment],
                 options[:user],
                 options[:path]
end
destroy() click to toggle source
# File lib/procfile_upstart_exporter/cli.rb, line 34
def destroy
  enter_verbose_mode if options[:verbose]
  destroyer.destroy options[:application], options[:path]
end

Private Instance Methods

enter_verbose_mode() click to toggle source
# File lib/procfile_upstart_exporter/cli.rb, line 44
def enter_verbose_mode
  ProcfileUpstartExporter.logger.level = Logger::DEBUG
end