Class: Muwu::RenderHtmlPartialBuilder::NavigatorBuilder
- Inherits:
-
Object
- Object
- Muwu::RenderHtmlPartialBuilder::NavigatorBuilder
show all
- Includes:
- Muwu
- Defined in:
- lib/muwu/render_html_partial_builder/render_navigator_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 NavigatorBuilder.
22
23
24
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 22
def initialize
@renderer = RenderHtmlPartial::Navigator.new
end
|
Instance Attribute Details
#project ⇒ Object
Returns the value of attribute project.
9
10
11
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_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_navigator_builder.rb', line 9
def renderer
@renderer
end
|
Class Method Details
.build {|builder| ... } ⇒ Object
15
16
17
18
19
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 15
def self.build
builder = new
yield(builder)
builder.renderer
end
|
Instance Method Details
#build_from_manifest_task_navigator(navigator) ⇒ Object
27
28
29
30
31
32
33
34
35
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 27
def build_from_manifest_task_navigator(navigator)
@navigator = navigator
@project = navigator.project
set_destination
set_heading
set_href_document_home
set_href_document_next
set_href_document_prev
end
|
#set_destination ⇒ Object
38
39
40
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 38
def set_destination
@renderer.destination = @navigator.destination
end
|
#set_heading ⇒ Object
43
44
45
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 43
def set_heading
@renderer.heading = @navigator.heading
end
|
#set_href_document_home ⇒ Object
48
49
50
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 48
def set_href_document_home
@renderer.href_document_home = determine_href_by_index(@navigator.document_home_index)
end
|
#set_href_document_next ⇒ Object
53
54
55
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 53
def set_href_document_next
@renderer.href_document_next = determine_href_by_index(@navigator.document_next_index)
end
|
#set_href_document_prev ⇒ Object
58
59
60
|
# File 'lib/muwu/render_html_partial_builder/render_navigator_builder.rb', line 58
def set_href_document_prev
@renderer.href_document_prev = determine_href_by_index(@navigator.document_prev_index)
end
|