Class: RubyMVC::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_mvc/application.rb

Overview

This provides the entry point for a basic application.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, &block) ⇒ Application

Returns a new instance of Application.



33
34
35
36
37
38
39
40
41
42
# File 'lib/ruby_mvc/application.rb', line 33

def initialize(options, &block)
  self.frame = Toolkit::Frame.new(options)
  if cc = options[:controller]
    self.controller = cc
    self.controller.app = self
    self.controller.init
  end
  self.instance_eval(&block) if block
  self.frame.show
end

Instance Attribute Details

#controllerObject

Returns the value of attribute controller.



31
32
33
# File 'lib/ruby_mvc/application.rb', line 31

def controller
  @controller
end

#frameObject

Returns the value of attribute frame.



30
31
32
# File 'lib/ruby_mvc/application.rb', line 30

def frame
  @frame
end