class Muwu::RenderHtmlPartial::Text

Attributes

destination[RW]
html_attr_id[RW]
project[RW]
sections[RW]
text_root_name[RW]
will_render_section_numbers[RW]

Public Instance Methods

render() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 20
def render
  @destination.padding_vertical(1) do
    render_tag_div_open
    render_sections
    render_tag_div_close
  end
end
render_sections() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 29
def render_sections
  @destination.padding_vertical(1) do
    @sections.each do |section|
      section.render
    end
  end
end
render_tag_div_close() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 38
def render_tag_div_close
  write_tag_div_close
end
render_tag_div_open() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 43
def render_tag_div_open
  write_tag_div_open
end
write_tag_div_close() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 48
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_text.rb, line 53
def write_tag_div_open
  @destination.write_line tag_div_open
end

Private Instance Methods

tag_div_close() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 62
def tag_div_close
  "</div>"
end
tag_div_open() click to toggle source
# File lib/muwu/render_html_partial/render_text.rb, line 67
def tag_div_open
  "<div class='text' data-text_root_name='#{@text_root_name}' id='#{@html_attr_id}'>"
end