Class: Belajar::Views::MainMenu

Inherits:
Object
  • Object
show all
Includes:
Belajar::Views
Defined in:
lib/belajar/views/main_menu.rb

Overview

Subscription: ‘first.subscribe(second)` means first subscribes second on the first’s broadcast. second has to have method that is broadcasted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Belajar::Views

#reset_menu_position

Constructor Details

#initializeMainMenu

Returns a new instance of MainMenu.



13
14
15
16
17
18
19
20
21
# File 'lib/belajar/views/main_menu.rb', line 13

def initialize
  @courses_menu  = Views::CoursesMenu.new
  @chapters_menu = Views::ChaptersMenu.new
  @units_menu    = Views::UnitsMenu.new
  @task_view     = Views::TaskView.new

  subscribe_events
  courses_menu.enter
end

Instance Attribute Details

#chapters_menuObject (readonly)

Returns the value of attribute chapters_menu.



11
12
13
# File 'lib/belajar/views/main_menu.rb', line 11

def chapters_menu
  @chapters_menu
end

#courses_menuObject (readonly)

Returns the value of attribute courses_menu.



11
12
13
# File 'lib/belajar/views/main_menu.rb', line 11

def courses_menu
  @courses_menu
end

#task_viewObject (readonly)

Returns the value of attribute task_view.



11
12
13
# File 'lib/belajar/views/main_menu.rb', line 11

def task_view
  @task_view
end

#units_menuObject (readonly)

Returns the value of attribute units_menu.



11
12
13
# File 'lib/belajar/views/main_menu.rb', line 11

def units_menu
  @units_menu
end