Class: RubyMVC::Views::WebView
- Defined in:
- lib/ruby_mvc/views/web_view.rb
Overview
This is a more sophisticated view control vs. the standard toolkit widget.
Instance Attribute Summary
Attributes inherited from View
Instance Method Summary collapse
-
#load(model, options = {}, &block) ⇒ Object
This method is used to load the view with the information in the table model.
Methods inherited from View
create_widget, #initialize, #method_missing, #peer, widget, widget_def
Constructor Details
This class inherits a constructor from RubyMVC::Views::View
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RubyMVC::Views::View
Instance Method Details
#load(model, options = {}, &block) ⇒ Object
This method is used to load the view with the information in the table model.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/ruby_mvc/views/web_view.rb', line 38 def load(model, = {}, &block) cols = columns(model, ) if r = [:renderer] html = r.render(model, cols, [:renderer_options]) puts "HTML:\n#{html}" .load_html(html) else raise ArgumentError,"renderer not specified" end end |