class Daemons::ApplicationGroup
def new_application(add_options = {})
def new_application(add_options = {}) if @applications.size > 0 and not @multiple if options[:force] @applications.delete_if {|a| unless a.running? a.zap true end } end raise RuntimeException.new('there is already one or more instance(s) of the program running') unless @applications.empty? end app = Application.new(self, add_options) setup_app(app) @applications << app return app end