Class: Upstart::Exporter
- Inherits:
-
Object
- Object
- Upstart::Exporter
- Includes:
- Errors
- Defined in:
- lib/upstart-exporter.rb,
lib/upstart-exporter/version.rb,
lib/upstart-exporter/templates.rb
Defined Under Namespace
Modules: Errors, Options Classes: Error, Templates
Constant Summary
- VERSION =
"0.1.0"
Instance Attribute Summary (collapse)
-
- (Object) options
readonly
Returns the value of attribute options.
Instance Method Summary (collapse)
- - (Object) clear
- - (Object) export
-
- (Exporter) initialize(command_line_args)
constructor
A new instance of Exporter.
Methods included from Errors
Constructor Details
- (Exporter) initialize(command_line_args)
A new instance of Exporter
13 14 15 16 17 18 |
# File 'lib/upstart-exporter.rb', line 13 def initialize(command_line_args) = Options::Global.new = Options::CommandLine.new(command_line_args) = .merge() ensure_dirs end |
Instance Attribute Details
- (Object) options (readonly)
Returns the value of attribute options
11 12 13 |
# File 'lib/upstart-exporter.rb', line 11 def end |
Instance Method Details
- (Object) clear
28 29 30 31 32 33 34 35 36 |
# File 'lib/upstart-exporter.rb', line 28 def clear FileUtils.rm(upstart_conf) if FileTest.file?(upstart_conf) Dir[upstart_cmd_conf('*')].each do |f| FileUtils.rm(f) end Dir[helper_cmd_conf('*')].each do |f| FileUtils.rm(f) end end |
- (Object) export
20 21 22 23 24 25 26 |
# File 'lib/upstart-exporter.rb', line 20 def export clear export_app [:commands].each do |cmd_name, cmd| export_command(cmd_name, cmd) end end |