Class: Epuber::Compiler::FileTypes::GeneratedFile
- Inherits:
-
AbstractFile
- Object
- AbstractFile
- Epuber::Compiler::FileTypes::GeneratedFile
- Defined in:
- lib/epuber/compiler/file_types/generated_file.rb
Direct Known Subclasses
ContainerXMLFile, IBooksDisplayOptionsFile, MimeTypeFile, NavFile, OPFFile
Instance Attribute Summary collapse
-
#content ⇒ String | #to_s
Files content.
Attributes inherited from AbstractFile
#compilation_context, #destination_path, #final_destination_path, #group, #path_type, #pkg_destination_path, #properties
Instance Method Summary collapse
Methods inherited from AbstractFile
#==, file_copy!, write_to_file, write_to_file!, write_to_file?
Instance Attribute Details
#content ⇒ String | #to_s
Returns files content.
11 12 13 |
# File 'lib/epuber/compiler/file_types/generated_file.rb', line 11 def content @content end |
Instance Method Details
#process(_compilation_context) ⇒ Object
15 16 17 |
# File 'lib/epuber/compiler/file_types/generated_file.rb', line 15 def process(_compilation_context) write_generate(content.to_s) end |
#write_generate(content) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/epuber/compiler/file_types/generated_file.rb', line 19 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 |