class Epuber::Compiler::FileTypes::GeneratedFile

Attributes

content[RW]

@return [String | to_s] files content

Public Instance Methods

process(compilation_context) click to toggle source

@param [Compiler::CompilationContext] compilation_context

# File lib/epuber/compiler/file_types/generated_file.rb, line 16
def process(compilation_context)
  write_generate(content.to_s)
end
write_generate(content) click to toggle source
# File lib/epuber/compiler/file_types/generated_file.rb, line 20
def write_generate(content)
  if self.class.write_to_file?(content, final_destination_path)
    UI.print_processing_debug_info("#{pkg_destination_path}: Writing generated content")
    self.class.write_to_file!(content, final_destination_path)
  else
    UI.print_processing_debug_info("#{pkg_destination_path}: Not writing to disk ... generated content is same")
  end
end