lib/serfx/utils/async_job.rb
# writes a hash as JSON in the state_file
# @param [Hash] state represented as a hash, to be written
writes a hash as JSON in the state_file
writes a hash as JSON in the state_file
def write_state(state)
        if state_file
          File.open(state_file, 'w') do |f|
            f.write(JSON.generate(state))
          end
        end
      end
def write_state ( state ) if state_file File . open ( state_file , 'w' ) do | f | f . write ( JSON . generate ( state ) ) end end end
writes a hash as JSON in the state_file
writes a hash as JSON in the state_file
state
state represented as a hash, to be written
state represented as a hash to be written