Class: Awestruct::Handlers::VerbatimFileHandler

Inherits:
FileHandler show all
Defined in:
lib/awestruct/handlers/verbatim_file_handler.rb

Instance Attribute Summary

Attributes inherited from FileHandler

#path

Attributes inherited from BaseHandler

#delegate, #site

Instance Method Summary collapse

Methods inherited from FileHandler

#initialize, #input_mtime, #output_filename, #raw_content, #relative_source_path, #rendered_content, #stale?

Methods inherited from BaseHandler

#content_line_offset, #content_syntax, #dependencies, #execute_shell, #front_matter, #inherit_front_matter, #initialize, #input_mtime, #output_extension, #output_filename, #output_path, #path, #raw_content, #relative_source_path, #rendered_content, #simple_name, #stale?, #to_chain

Constructor Details

This class inherits a constructor from Awestruct::Handlers::FileHandler

Instance Method Details

#read_contentObject

Read file in binary mode so that it can be copied to the generated site as is



7
8
9
# File 'lib/awestruct/handlers/verbatim_file_handler.rb', line 7

def read_content
  File.open(@path, 'rb') {|is| is.read }
end