Class: Nemo::Examples::PersonEditor::ListItemViewer

Inherits:
Visitors::Viewer show all
Defined in:
lib/nemo/examples/person_editor.rb

Overview

Used by render to display model as a single table with one row per record, versus one table per record.

Instance Attribute Summary

Attributes inherited from Visitors::Visitor

#metaobject

Instance Method Summary collapse

Methods inherited from Visitors::Viewer

#initialize, #render_fields, #render_relationship_item, #visit_boolean_attribute, #visit_date_attribute, #visit_multiple_attribute, #visit_multiple_relationship_attribute, #visit_password_attribute, #visit_single_relationship_attribute, #visit_text_attribute

Methods inherited from Visitors::Visitor

#initialize

Methods included from Util::Accessors

#bool_accessor, #call_accessor, #proc_accessor

Constructor Details

This class inherits a constructor from Nemo::Visitors::Viewer

Instance Method Details

#renderObject



27
28
29
# File 'lib/nemo/examples/person_editor.rb', line 27

def render
  render_fields
end

#render_label(a, &block) ⇒ Object



31
32
33
# File 'lib/nemo/examples/person_editor.rb', line 31

def render_label(a, &block)
  r.table_data { block ? block.call : r.space }
end