Sha256: 41802b0c6d503931b327544c59f8effa9d0502daf9d1aab07cb5a81e178c824d
Contents?: true
Size: 910 Bytes
Versions: 19
Compression:
Stored size: 910 Bytes
Contents
require_dependency "renalware/pathology" module Renalware module Pathology # Reponsible for rendering a HTML table for recent observation results. # class RecentObservationResults::HTMLTableView < SimpleDelegator def render(view_model) content_tag(:table, id: "observations") do format_body(view_model) end end private def format_body(rows) rows.each do |row| header, *values = row concat(content_tag(:tr) do format_row(header, values) end) end end def format_row(header, values) content_tag(:td, title: header.title) do concat(header) values.each do |cell| concat(format_cell(cell)) end end end def format_cell(cell) content_tag(:td, cell, class: cell.html_class) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems