Class: Muwu::RenderHtmlPartial::Text

Inherits:
Object
  • Object
show all
Includes:
Muwu
Defined in:
lib/muwu/render_html_partial/render_text.rb

Constant Summary

Constants included from Muwu

GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Muwu

debug, read

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def destination
  @destination
end

#html_attr_idObject

Returns the value of attribute html_attr_id.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def html_attr_id
  @html_attr_id
end

#projectObject

Returns the value of attribute project.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def project
  @project
end

#sectionsObject

Returns the value of attribute sections.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def sections
  @sections
end

#text_root_nameObject

Returns the value of attribute text_root_name.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def text_root_name
  @text_root_name
end

Returns the value of attribute will_render_end_links.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def will_render_end_links
  @will_render_end_links
end

#will_render_section_numbersObject

Returns the value of attribute will_render_section_numbers.



9
10
11
# File 'lib/muwu/render_html_partial/render_text.rb', line 9

def will_render_section_numbers
  @will_render_section_numbers
end

Instance Method Details

#renderObject



20
21
22
23
24
25
26
# 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_sectionsObject



29
30
31
32
33
34
35
# 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_closeObject



38
39
40
# File 'lib/muwu/render_html_partial/render_text.rb', line 38

def render_tag_div_close
  write_tag_div_close
end

#render_tag_div_openObject



43
44
45
# File 'lib/muwu/render_html_partial/render_text.rb', line 43

def render_tag_div_open
  write_tag_div_open
end

#write_tag_div_closeObject



48
49
50
# 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_openObject



53
54
55
# File 'lib/muwu/render_html_partial/render_text.rb', line 53

def write_tag_div_open
  @destination.write_line tag_div_open
end