Class: JLDrill::DisplayQuizStatusContext
Defined Under Namespace
Classes: QuizStatusView
Instance Attribute Summary
#mainView, #parent, #viewBridge
Instance Method Summary
collapse
#addView, #isEntered?, #onExit, #peekAtView, #setupViews
Constructor Details
Returns a new instance of DisplayQuizStatusContext.
10
11
12
|
# File 'lib/jldrill/contexts/DisplayQuizStatusContext.rb', line 10
def initialize(viewBridge)
super(viewBridge)
end
|
Instance Method Details
#createViews ⇒ Object
24
25
26
|
# File 'lib/jldrill/contexts/DisplayQuizStatusContext.rb', line 24
def createViews
@mainView = @viewBridge.QuizStatusView.new(self)
end
|
#destroyViews ⇒ Object
28
29
30
|
# File 'lib/jldrill/contexts/DisplayQuizStatusContext.rb', line 28
def destroyViews
@mainView = nil
end
|
#enter(parent) ⇒ Object
32
33
34
35
36
|
# File 'lib/jldrill/contexts/DisplayQuizStatusContext.rb', line 32
def enter(parent)
super(parent)
quizUpdated(@parent.quiz)
@parent.quiz.subscribe(self)
end
|
#exit ⇒ Object
38
39
40
41
|
# File 'lib/jldrill/contexts/DisplayQuizStatusContext.rb', line 38
def exit
@parent.quiz.unsubscribe(self)
super
end
|
#quizUpdated(quiz) ⇒ Object
43
44
45
|
# File 'lib/jldrill/contexts/DisplayQuizStatusContext.rb', line 43
def quizUpdated(quiz)
@mainView.update(quiz)
end
|