Class: Vedeu::Renderers::File
- Inherits:
-
Object
- Object
- Vedeu::Renderers::File
- Includes:
- Options
- Defined in:
- lib/vedeu/renderers/support/file.rb
Overview
Writes the given output to a file.
Instance Attribute Summary
Attributes included from Options
Instance Method Summary collapse
- #content ⇒ String private
-
#write ⇒ String
Render the output (either content or clearing) to a file.
- #write_file? ⇒ Boolean private
Methods included from Options
#clear, #compression, #compression?, #default_template, #defaults, #end_row_tag, #end_tag, #filename, #initialize, #output, #output?, #render, #start_row_tag, #start_tag, #template, #timestamp, #timestamp?, #write_file
Methods included from Common
#absent?, #array?, #boolean, #boolean?, #empty_value?, #escape?, #falsy?, #hash?, #line_model?, #numeric?, #positionable?, #present?, #snake_case, #stream_model?, #string?, #symbol?, #truthy?, #view_model?
Instance Method Details
#content ⇒ String (private)
27 28 29 |
# File 'lib/vedeu/renderers/support/file.rb', line 27 def content output end |
#write ⇒ String
Render the output (either content or clearing) to a file.
16 17 18 19 20 21 22 |
# File 'lib/vedeu/renderers/support/file.rb', line 16 def write data = content ::File.write(filename, data) data end |
#write_file? ⇒ Boolean (private)
32 33 34 |
# File 'lib/vedeu/renderers/support/file.rb', line 32 def write_file? true end |