Class: Muwu::RenderHtmlPartialBuilder::SubcontentsBuilder
- Inherits:
-
Object
- Object
- Muwu::RenderHtmlPartialBuilder::SubcontentsBuilder
show all
- Includes:
- Muwu
- Defined in:
- lib/muwu/render_html_partial_builder/render_subcontents_builder.rb
Constant Summary
Constants included
from Muwu
GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Muwu
debug, read
Constructor Details
Returns a new instance of SubcontentsBuilder.
24
25
26
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 24
def initialize
@renderer = RenderHtmlPartial::Subcontents.new
end
|
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project.
9
10
11
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 9
def project
@project
end
|
#renderer ⇒ Object
Returns the value of attribute renderer.
9
10
11
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 9
def renderer
@renderer
end
|
#task_subcontents ⇒ Object
Returns the value of attribute task_subcontents.
9
10
11
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 9
def task_subcontents
@task_subcontents
end
|
#text_root_name ⇒ Object
Returns the value of attribute text_root_name.
9
10
11
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 9
def text_root_name
@text_root_name
end
|
Class Method Details
.build {|builder| ... } ⇒ Object
17
18
19
20
21
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 17
def self.build
builder = new
yield(builder)
builder.renderer
end
|
Instance Method Details
#build_from_manifest_task_subcontents(task_subcontents) ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
40
|
# 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 ⇒ Object
43
44
45
|
# 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 ⇒ Object
48
49
50
|
# 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 ⇒ Object
53
54
55
|
# 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 ⇒ Object
58
59
60
|
# 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 ⇒ Object
63
64
65
|
# File 'lib/muwu/render_html_partial_builder/render_subcontents_builder.rb', line 63
def set_project
@renderer.project = @project
end
|
#set_text_root_blocks ⇒ Object
68
69
70
|
# 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 ⇒ Object
73
74
75
|
# 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 ⇒ Object
78
79
80
|
# 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
|