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
#destination_path, #final_destination_path, #group, #path_type, #pkg_destination_path, #properties
Instance Method Summary collapse
Methods inherited from AbstractFile
#==, file_copy, file_copy!, file_copy?, write_to_file, write_to_file!, write_to_file?
Instance Attribute Details
#content ⇒ String | #to_s
Returns files content.
12 13 14 |
# File 'lib/epuber/compiler/file_types/generated_file.rb', line 12 def content @content end |
Instance Method Details
#process(compilation_context) ⇒ Object
16 17 18 |
# File 'lib/epuber/compiler/file_types/generated_file.rb', line 16 def process(compilation_context) write_generate(content.to_s) end |
#write_generate(content) ⇒ Object
20 21 22 23 24 25 |
# 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("Writing generated content to #{pkg_destination_path}") self.class.write_to_file!(content, final_destination_path) end end |