Sha256: 3b33bef207a7066aa1eaf2ab2658d86a538748a9abc85e871669992c205bb2e7

Contents?: true

Size: 319 Bytes

Versions: 4

Compression:

Stored size: 319 Bytes

Contents

require "foreman/export/base"
require "json"

class Foreman::Export::JSON < Foreman::Export::Base

  def export(fname=nil, options={})
    processes = engine.processes.values.inject({}) do |hash, process|
      hash.update(process.name => { "command" => process.command })
    end
    puts processes.to_json
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman-0.12.0 lib/foreman/export/json.rb
foreman-0.12.0.pre1 lib/foreman/export/json.rb
foreman-0.11.1 lib/foreman/export/json.rb
foreman-0.11.0 lib/foreman/export/json.rb