Class: RubyMVC::Application
- Inherits:
-
Object
- Object
- RubyMVC::Application
- Defined in:
- lib/ruby_mvc/application.rb
Overview
This provides the entry point for a basic application.
Instance Attribute Summary collapse
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#frame ⇒ Object
Returns the value of attribute frame.
Instance Method Summary collapse
-
#initialize(options, &block) ⇒ Application
constructor
A new instance of Application.
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(, &block) self.frame = Toolkit::Frame.new() if cc = [: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
#controller ⇒ Object
Returns the value of attribute controller.
31 32 33 |
# File 'lib/ruby_mvc/application.rb', line 31 def controller @controller end |
#frame ⇒ Object
Returns the value of attribute frame.
30 31 32 |
# File 'lib/ruby_mvc/application.rb', line 30 def frame @frame end |