Class: Belajar::Views::Subscriber
- Inherits:
-
Object
- Object
- Belajar::Views::Subscriber
- Defined in:
- lib/belajar/views/subscriber.rb
Instance Attribute Summary collapse
-
#chapters_menu ⇒ Object
readonly
Returns the value of attribute chapters_menu.
-
#courses_menu ⇒ Object
readonly
Returns the value of attribute courses_menu.
-
#task_view ⇒ Object
readonly
Returns the value of attribute task_view.
-
#units_menu ⇒ Object
readonly
Returns the value of attribute units_menu.
Instance Method Summary collapse
-
#initialize(courses_menu:, chapters_menu:, units_menu:, task_view:) ⇒ Subscriber
constructor
A new instance of Subscriber.
- #subscribe_bottom_up_navigation ⇒ Object
- #subscribe_events! ⇒ Object
- #subscribe_menu_position_reset ⇒ Object
- #subscribe_top_down_navigation ⇒ Object
Constructor Details
#initialize(courses_menu:, chapters_menu:, units_menu:, task_view:) ⇒ Subscriber
Returns a new instance of Subscriber.
6 7 8 9 10 11 |
# File 'lib/belajar/views/subscriber.rb', line 6 def initialize(courses_menu:, chapters_menu:, units_menu:, task_view:) @courses_menu = @chapters_menu = @units_menu = @task_view = task_view end |
Instance Attribute Details
#chapters_menu ⇒ Object (readonly)
Returns the value of attribute chapters_menu.
4 5 6 |
# File 'lib/belajar/views/subscriber.rb', line 4 def @chapters_menu end |
#courses_menu ⇒ Object (readonly)
Returns the value of attribute courses_menu.
4 5 6 |
# File 'lib/belajar/views/subscriber.rb', line 4 def @courses_menu end |
#task_view ⇒ Object (readonly)
Returns the value of attribute task_view.
4 5 6 |
# File 'lib/belajar/views/subscriber.rb', line 4 def task_view @task_view end |
#units_menu ⇒ Object (readonly)
Returns the value of attribute units_menu.
4 5 6 |
# File 'lib/belajar/views/subscriber.rb', line 4 def @units_menu end |
Instance Method Details
#subscribe_bottom_up_navigation ⇒ Object
25 26 27 28 29 |
# File 'lib/belajar/views/subscriber.rb', line 25 def .subscribe(, on: :reenter) .subscribe(, on: :reenter) task_view.subscribe(, on: :reenter) end |
#subscribe_events! ⇒ Object
13 14 15 16 17 |
# File 'lib/belajar/views/subscriber.rb', line 13 def subscribe_events! end |
#subscribe_menu_position_reset ⇒ Object
31 32 33 34 35 |
# File 'lib/belajar/views/subscriber.rb', line 31 def .subscribe(, on: :reset_menu_position) .subscribe(, on: :reset_menu_position) .subscribe(, on: :reset_menu_position) end |
#subscribe_top_down_navigation ⇒ Object
19 20 21 22 23 |
# File 'lib/belajar/views/subscriber.rb', line 19 def .subscribe(, on: :enter) .subscribe(, on: :enter) .subscribe(task_view, on: :enter) end |