class Muwu::RenderHtmlPartialBuilder::SubcontentsBuilder

Attributes

project[RW]
renderer[RW]
task_subcontents[RW]
text_root_name[RW]

Public Class Methods

build() { |builder| ... } click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 17
def self.build
  builder = new
  yield(builder)
  builder.renderer
end
new() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 24
def initialize
  @renderer = RenderHtmlPartial::Subcontents.new
end

Public Instance Methods

build_from_manifest_task_subcontents(task_subcontents) click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 29
def build_from_manifest_task_subcontents(task_subcontents)
  @project = task_subcontents.project
  @task_subcontents = task_subcontents
  @text_root_name = task_subcontents.text_root_name
  set_destination
  set_href_helper
  set_html_attr_id
  set_item_depth_max
  set_project
  set_text_root_blocks
  set_will_render_section_numbers
end
set_destination() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 43
def set_destination
  @renderer.destination = @task_subcontents.destination
end
set_href_helper() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 48
def set_href_helper
  @renderer.href_helper = Helper::HtmlHrefHelper.new(@task_subcontents)
end
set_html_attr_id() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 53
def set_html_attr_id
  @renderer.html_attr_id = ['subcontents'].join('_')
end
set_item_depth_max() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 58
def set_item_depth_max
  @renderer.item_depth_max = @project.options.render_sections_distinctly_depth_max
end
set_project() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 63
def set_project
  @renderer.project = @project
end
set_text_root_blocks() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 68
def set_text_root_blocks
  @renderer.text_root_blocks = @task_subcontents.text_root_blocks
end
set_text_root_name() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 73
def set_text_root_name
  @renderer.text_root_name = @text_root_name
end
set_will_render_section_numbers() click to toggle source
# File lib/muwu/render_html_partial_builder/render_subcontents_builder.rb, line 78
def set_will_render_section_numbers
  @renderer.will_render_section_numbers = @project.options.render_section_numbers
end