Method: Condenser::Export#write

Defined in:
lib/condenser/export.rb

#write(output_directory) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/condenser/export.rb', line 61

def write(output_directory)
  files = @environment.writers_for_mime_type(content_type).map do |writer|
    if writer.exist?(self)
      @environment.logger.debug "Skipping #{ self.path }, already exists"
    else
      @environment.logger.info "Writing #{ self.path }"
      writer.call(output_directory, self)
    end
  end
  files.flatten.compact
end