Class: MarkdownRecord::Rendering::Nodes::HtmlDirectory
- Defined in:
- lib/markdown_record/rendering/nodes/html_directory.rb
Constant Summary
Constants inherited from HtmlBase
MarkdownRecord::Rendering::Nodes::HtmlBase::HTML_MACROS, MarkdownRecord::Rendering::Nodes::HtmlBase::HTML_SUBSTITUTIONS
Constants included from ContentDsl
ContentDsl::HTML_COMMENT_REGEX
Constants included from ContentDsl::Enable
ContentDsl::Enable::ENCODED_REGEX, ContentDsl::Enable::REGEX
Constants included from ContentDsl::Disable
ContentDsl::Disable::ENCODED_REGEX, ContentDsl::Disable::REGEX
Constants included from ContentDsl::UseLayout
ContentDsl::UseLayout::ENCODED_REGEX, ContentDsl::UseLayout::REGEX
Constants included from ContentDsl::Fragment
ContentDsl::Fragment::ENCODED_REGEX, ContentDsl::Fragment::REGEX
Constants included from ContentDsl::DirectoryFragment
ContentDsl::DirectoryFragment::ENCODED_REGEX, ContentDsl::DirectoryFragment::REGEX
Constants included from ContentDsl::EndModel
ContentDsl::EndModel::ENCODED_REGEX, ContentDsl::EndModel::REGEX
Constants included from ContentDsl::EndAttribute
ContentDsl::EndAttribute::ENCODED_REGEX, ContentDsl::EndAttribute::REGEX
Constants included from ContentDsl::Attribute
ContentDsl::Attribute::ENCODED_REGEX, ContentDsl::Attribute::REGEX
Constants included from ContentDsl::Model
ContentDsl::Model::ENCODED_REGEX, ContentDsl::Model::REGEX
Constants included from ContentDsl::Scope
ContentDsl::Scope::ENCODED_REGEX, ContentDsl::Scope::REGEX
Instance Attribute Summary
Attributes inherited from HtmlBase
#name, #processed_html, #rendered_html
Instance Method Summary collapse
Methods inherited from HtmlBase
#finalize_html, #global_layout, #initialize, #load_layout, #process_html, #render_erb, #render_erbs, #save, #sort_value
Methods included from ContentDsl
#remove_html_dsl_command, #remove_json_dsl_commands
Methods included from ContentDsl::Enable
Methods included from ContentDsl::Disable
Methods included from ContentDsl::UseLayout
Methods included from ContentDsl::Fragment
Methods included from ContentDsl::DirectoryFragment
#directory_fragment_dsl, remove_dsl
Methods included from ContentDsl::EndModel
Methods included from ContentDsl::EndAttribute
#end_attribute_dsl, remove_dsl
Methods included from ContentDsl::Attribute
Methods included from ContentDsl::Model
Methods included from ContentDsl::Scope
Methods included from PathUtilities
#base_content_root_name, #base_rendered_path, #base_rendered_root, #clean_path, #erb_locals_from_path, #fragment_attributes_from_path, #full_path_to_parts, #path_to_fragment_id, #remove_prefix, #rendered_path, #scoped_id_to_parts, #to_scoped_id
Constructor Details
This class inherits a constructor from MarkdownRecord::Rendering::Nodes::HtmlBase
Instance Method Details
#concatenate_html ⇒ Object
20 21 22 23 24 25 |
# File 'lib/markdown_record/rendering/nodes/html_directory.rb', line 20 def concatenate_html return @rendered_html if @rendered_html.present? sorted_children = children.sort_by(&:sort_value) @rendered_html = sorted_children.map(&:concatenated_html).compact.join("\r\n") end |
#concatenated_html ⇒ Object
27 28 29 |
# File 'lib/markdown_record/rendering/nodes/html_directory.rb', line 27 def concatenated_html @rendered_html end |
#render(file_saver) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/markdown_record/rendering/nodes/html_directory.rb', line 6 def render(file_saver) children.each do |child| child.render(file_saver) end concatenate_html process_html finalize_html if @options[:concat] save(file_saver) end end |