lib/brief/document.rb in brief-1.9.4 vs lib/brief/document.rb in brief-1.9.6

- old
+ new

@@ -1,10 +1,11 @@ module Brief class Document include Brief::Document::Rendering include Brief::Document::FrontMatter include Brief::Document::Templating + include Brief::Document::Attachments def self.from_contents(content, frontmatter, &block) end attr_accessor :path, :content, :frontmatter, :raw_content, :options @@ -103,9 +104,17 @@ frontmatter.to_hash.to_yaml + "---\n\n#{ content }" end def data frontmatter + end + + def include_attachments? + attachments.length > 0 + end + + def attachments + Array(data.attachments) end def in_briefcase(briefcase) @briefcase_root = briefcase.root