Class: Upstart::Exporter::ExpandedExporter
- Inherits:
-
Object
- Object
- Upstart::Exporter::ExpandedExporter
- Includes:
- Errors, ExporterHelpers
- Defined in:
- lib/upstart-exporter/expanded_exporter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(options) ⇒ ExpandedExporter
constructor
A new instance of ExpandedExporter.
Methods included from Errors
Methods included from ExporterHelpers
#app_cmd, #app_name, #export_cmd_helper, #helper_cmd_conf, #upstart_cmd_conf
Constructor Details
#initialize(options) ⇒ ExpandedExporter
Returns a new instance of ExpandedExporter.
10 11 12 13 14 15 |
# File 'lib/upstart-exporter/expanded_exporter.rb', line 10 def initialize() @config = [:commands] @options = @commands = @config['commands'] @env = @config['env'] || {} end |
Class Method Details
.export(options) ⇒ Object
6 7 8 |
# File 'lib/upstart-exporter/expanded_exporter.rb', line 6 def self.export() new().export end |
Instance Method Details
#export ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/upstart-exporter/expanded_exporter.rb', line 17 def export @commands.each do |command, | if count = ['count'] count.times do |counter| export_cmd("#{command}_#{counter}", ) end else export_cmd(command, ) end end end |