Class: HotCocoaWindow

Inherits:
Object show all
Defined in:
lib/hotcocoa/mvc.rb

Direct Known Subclasses

ApplicationWindow

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application_controller) ⇒ HotCocoaWindow



105
106
107
108
# File 'lib/hotcocoa/mvc.rb', line 105

def initialize application_controller
  @application_controller = application_controller
  render
end

Instance Attribute Details

#application_controllerObject (readonly)

Returns the value of attribute application_controller



102
103
104
# File 'lib/hotcocoa/mvc.rb', line 102

def application_controller
  @application_controller
end

#application_windowObject (readonly)

Returns the value of attribute application_window



103
104
105
# File 'lib/hotcocoa/mvc.rb', line 103

def application_window
  @application_window
end

Instance Method Details

#renderObject



110
111
112
113
114
# File 'lib/hotcocoa/mvc.rb', line 110

def render
  @application_window = HotCocoa.window(ApplicationView.options[:window])
  @application_window.delegate_to(application_controller)
  @application_window.view << application_controller.application_view
end