Class: JLDrill::RunCommandContext
Defined Under Namespace
Classes: CommandView
Instance Attribute Summary
#mainView, #parent, #viewBridge
Instance Method Summary
collapse
#addView, #isEntered?, #onExit, #peekAtView, #setupViews
Constructor Details
Returns a new instance of RunCommandContext.
10
11
12
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 10
def initialize(viewBridge)
super(viewBridge)
end
|
Instance Method Details
#about ⇒ Object
136
137
138
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 136
def about
@parent.showAbout
end
|
#ack ⇒ Object
132
133
134
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 132
def ack
@parent.showAcknowlegements
end
|
#addNewVocabulary ⇒ Object
128
129
130
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 128
def addNewVocabulary
@parent.addNewVocabulary
end
|
#appendFile ⇒ Object
68
69
70
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 68
def appendFile
@parent.appendFile
end
|
#check ⇒ Object
96
97
98
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 96
def check
@parent.showAnswer
end
|
#correct ⇒ Object
104
105
106
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 104
def correct
@parent.correct
end
|
#createNew ⇒ Object
150
151
152
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 150
def createNew
@parent.createNew
end
|
#createViews ⇒ Object
25
26
27
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 25
def createViews
@mainView = @viewBridge.CommandView.new(self)
end
|
#deleteVocab ⇒ Object
124
125
126
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 124
def deleteVocab
@parent.deleteVocabulary
end
|
#destroyViews ⇒ Object
29
30
31
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 29
def destroyViews
@mainView = nil
end
|
#drill ⇒ Object
92
93
94
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 92
def drill
@parent.drill
end
|
#editVocab ⇒ Object
120
121
122
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 120
def editVocab
@parent.editVocabulary
end
|
#enter(parent) ⇒ Object
33
34
35
36
37
38
39
40
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 33
def enter(parent)
super(parent)
if !@parent.nil?
if !@parent.quiz.nil?
@parent.quiz.publisher.subscribe(self, "load")
end
end
end
|
#exit ⇒ Object
42
43
44
45
46
47
48
49
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 42
def exit
if !@parent.nil?
if !@parent.quiz.nil?
@parent.quiz.publisher.unsubscribe(self, "load")
end
end
super
end
|
#getReviewMode ⇒ Object
144
145
146
147
148
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 144
def getReviewMode
retVal = false
retVal = @parent.quiz.options.reviewMode unless @parent.quiz.nil?
retVal
end
|
#incorrect ⇒ Object
100
101
102
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 100
def incorrect
@parent.incorrect
end
|
#info ⇒ Object
84
85
86
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 84
def info
@parent.showQuizInfo
end
|
#learn ⇒ Object
154
155
156
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 154
def learn
@parent.learn
end
|
#loadExamples ⇒ Object
76
77
78
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 76
def loadExamples
@parent.loadExamples
end
|
#loadReference ⇒ Object
72
73
74
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 72
def loadReference
@parent.loadReference
end
|
#loadUpdated(quiz) ⇒ Object
51
52
53
54
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 51
def loadUpdated(quiz)
@mainView.update
end
|
#open ⇒ Object
64
65
66
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 64
def open
@parent.open
end
|
#options ⇒ Object
112
113
114
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 112
def options
@parent.setOptions
end
|
#quit ⇒ Object
80
81
82
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 80
def quit
@parent.quit
end
|
#removeDups ⇒ Object
158
159
160
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 158
def removeDups
@parent.removeDups
end
|
#resetQuiz ⇒ Object
116
117
118
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 116
def resetQuiz
@parent.reset
end
|
#save ⇒ Object
56
57
58
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 56
def save
@parent.save
end
|
#saveAs ⇒ Object
60
61
62
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 60
def saveAs
@parent.saveAs
end
|
#setReviewMode(bool) ⇒ Object
140
141
142
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 140
def setReviewMode(bool)
@parent.setReviewMode(bool)
end
|
#statistics ⇒ Object
88
89
90
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 88
def statistics
@parent.showStatistics
end
|
#vocabTable ⇒ Object
108
109
110
|
# File 'lib/jldrill/contexts/RunCommandContext.rb', line 108
def vocabTable
@parent.showAllVocabulary
end
|