class Muwu::RenderHtmlPartial::Navigator

Attributes

destination[RW]
heading[RW]
href_document_home[RW]
href_document_next[RW]
href_document_prev[RW]

Public Instance Methods

render() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 15
def render
  @destination.margin_to_zero
  @destination.padding_vertical(1) do
    write_tag_div_open
    # render_heading
    write_tag_nav_open
    render_prev
    render_home
    render_next
    write_tag_nav_close
    write_tag_div_close
  end
end
render_heading() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 30
def render_heading
  write_tag_heading
end
render_home() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 40
def render_home
  write_tag_a_home
end
render_next() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 45
def render_next
  write_tag_a_next
end
render_prev() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 35
def render_prev
  write_tag_a_prev
end
write_tag_a_home() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 50
def write_tag_a_home
  @destination.write_line tag_a_home
end
write_tag_a_next() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 55
def write_tag_a_next
  @destination.write_line tag_a_next
end
write_tag_a_prev() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 60
def write_tag_a_prev
  @destination.write_line tag_a_prev
end
write_tag_div_close() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 65
def write_tag_div_close
  @destination.write_line tag_div_close
end
write_tag_div_open() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 70
def write_tag_div_open
  @destination.write_line tag_div_open
end
write_tag_heading() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 75
def write_tag_heading
  @destination.write_line tag_heading
end
write_tag_nav_close() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 85
def write_tag_nav_close
  @destination.write_line tag_nav_close
end
write_tag_nav_open() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 80
def write_tag_nav_open
  @destination.write_line tag_nav_open
end

Private Instance Methods

tag_a_home() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 94
def tag_a_home
  "<a class='document_link' href='#{@href_document_home}'>[home]</a>"
end
tag_a_next() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 99
def tag_a_next
  "<a class='document_link' href='#{@href_document_next}'>[next]</a>"
end
tag_a_prev() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 104
def tag_a_prev
  "<a class='document_link' href='#{@href_document_prev}'>[prev]</a>"
end
tag_div_close() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 109
def tag_div_close
  "</div>"
end
tag_div_open() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 114
def tag_div_open
  "<div class='navigator'>"
end
tag_heading() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 119
def tag_heading
  "<h1>#{@heading}</h1>"
end
tag_nav_close() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 124
def tag_nav_close
  "</nav>"
end
tag_nav_open() click to toggle source
# File lib/muwu/render_html_partial/render_navigator.rb, line 129
def tag_nav_open
  "<nav class='document_links'>"
end