Class: MainController

Inherits:
Shirka::Controller show all
Defined in:
lib/troshka/main/controller.rb

Instance Attribute Summary

Attributes inherited from Shirka::Controller

#app, #components, #data, #parent, #view

Instance Method Summary collapse

Methods inherited from Shirka::Controller

#add_component, #add_item, #initialize, #item_controller_class, #on_component_added, #on_component_adding, #view_class

Methods included from Shirka::Eventalk

#add_watcher, #fire, #forward, #watch, #watchers

Constructor Details

This class inherits a constructor from Shirka::Controller

Instance Method Details

#init(data) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/troshka/main/controller.rb', line 6

def init(data)
  app.components[:output] = OutputController.new(app, self, [])
  add_component app.components[:output], :main
  
  add_component DetailController.new(app, self, []), :info
  add_component MethodsController.new(app, self, []), :info2
  
  app.components[:editor] = EditorController.new(app, self, [])
  add_component app.components[:editor], :editor
end

#startObject



2
3
4
# File 'lib/troshka/main/controller.rb', line 2

def start
  view.show
end