class NestedFile::FileSection::Write
Attributes
full_file_to_insert[RW]
parent_body[RW]
Public Instance Methods
should_write?()
click to toggle source
# File lib/nested_file/file_section.rb, line 33 def should_write? trimmed_parent_body.present? end
write!()
click to toggle source
# File lib/nested_file/file_section.rb, line 36 def write! return unless should_write? log "writing to #{full_file_to_insert}" File.create full_file_to_insert, trimmed_parent_body end