Class: Diffed::Section

Inherits:
Object
  • Object
show all
Includes:
Html
Defined in:
lib/models/section.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Html

#as_html_table

Constructor Details

#initialize(header, lines) ⇒ Section

Returns a new instance of Section.



8
9
10
# File 'lib/models/section.rb', line 8

def initialize(header, lines)
  @header, @lines = header, lines
end

Instance Attribute Details

#headerObject (readonly)

Returns the value of attribute header.



6
7
8
# File 'lib/models/section.rb', line 6

def header
  @header
end

#linesObject (readonly)

Returns the value of attribute lines.



6
7
8
# File 'lib/models/section.rb', line 6

def lines
  @lines
end

Instance Method Details

#as_html_rows(use_inline_styles) ⇒ Object



12
13
14
15
16
# File 'lib/models/section.rb', line 12

def as_html_rows(use_inline_styles)
  html = format_section_header_row(use_inline_styles)
  lines.each { |line| html << line.as_html_row(use_inline_styles) }
  html
end