Class: Muwu::ManifestTaskBuilders::SubcontentsBuilder
- Inherits:
-
Object
- Object
- Muwu::ManifestTaskBuilders::SubcontentsBuilder
show all
- Includes:
- Muwu, Helper
- Defined in:
- lib/muwu/manifest_task_builder/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.
25
26
27
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 25
def initialize
@manifest_subcontents = ManifestTask::Subcontents.new
end
|
Instance Attribute Details
#manifest_subcontents ⇒ Object
Returns the value of attribute manifest_subcontents.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 10
def manifest_subcontents
@manifest_subcontents
end
|
#outline_subcontents ⇒ Object
Returns the value of attribute outline_subcontents.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 10
def outline_subcontents
@outline_subcontents
end
|
#parent_document ⇒ Object
Returns the value of attribute parent_document.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 10
def parent_document
@parent_document
end
|
#project ⇒ Object
Returns the value of attribute project.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 10
def project
@project
end
|
Class Method Details
.build {|builder| ... } ⇒ Object
18
19
20
21
22
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 18
def self.build
builder = new
yield(builder)
builder.manifest_subcontents
end
|
Instance Method Details
#build_from_document(outline_step, parent_document) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 30
def build_from_document(outline_step, parent_document)
@outline_subcontents = outline_step
@parent_document = parent_document
@project = parent_document.project
phase_1_set_parent
phase_1_set_project
phase_2_set_destination
phase_2_set_text_root_name
phase_3_set_item_depth_max
phase_3_set_will_render_section_numbers
end
|
#phase_1_set_parent ⇒ Object
43
44
45
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 43
def phase_1_set_parent
@manifest_subcontents.parent = @parent_document
end
|
#phase_1_set_project ⇒ Object
48
49
50
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 48
def phase_1_set_project
@manifest_subcontents.project = @project
end
|
#phase_2_set_destination ⇒ Object
53
54
55
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 53
def phase_2_set_destination
@manifest_subcontents.destination = @parent_document.destination
end
|
#phase_2_set_text_root_name ⇒ Object
58
59
60
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 58
def phase_2_set_text_root_name
@manifest_subcontents.text_root_name = determine_text_root_name
end
|
#phase_3_set_item_depth_max ⇒ Object
63
64
65
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 63
def phase_3_set_item_depth_max
@manifest_subcontents.item_depth_max = @project.options.render_sections_distinctly_depth_max
end
|
#phase_3_set_will_render_section_numbers ⇒ Object
68
69
70
|
# File 'lib/muwu/manifest_task_builder/subcontents_builder.rb', line 68
def phase_3_set_will_render_section_numbers
@manifest_subcontents.will_render_section_numbers = @project.options.render_section_numbers
end
|