Class: RubyMVC::Views::WebModelView

Inherits:
WebContentView show all
Includes:
Tagz
Defined in:
lib/ruby_mvc/views/web_model_view.rb

Direct Known Subclasses

ActiveRecordWebModelView

Instance Attribute Summary

Attributes inherited from WebContentView

#uri

Attributes inherited from View

#actions, #controller

Instance Method Summary collapse

Methods included from Toolkit::SignalHandler::ClassMethods

#signal, #signals, #valid_signal!, #valid_signal?

Methods included from Toolkit::SignalHandler

#signal_connect, #signal_disconnect, #signal_emit

Constructor Details

#initialize(row, options = {}) ⇒ WebModelView

Returns a new instance of WebModelView.



32
33
34
35
36
37
38
39
40
# File 'lib/ruby_mvc/views/web_model_view.rb', line 32

def initialize(row, options = {})
  if options.is_a? Hash
    @template = options[:template]
  else
    @template = options
    options = {}
  end
  super((@template ? @template.apply(row) : row), options)
end

Instance Method Details

#renderObject



42
43
44
# File 'lib/ruby_mvc/views/web_model_view.rb', line 42

def render
  render_properties
end