Class: JLDrill::ExampleSentence
- Inherits:
-
Object
- Object
- JLDrill::ExampleSentence
- Defined in:
- lib/jldrill/model/ExampleSentence.rb
Overview
An example sentence. Each sentence has a key indicating the vocabulary usage that was searched for to generate the Example Sentence.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize ⇒ ExampleSentence
constructor
A new instance of ExampleSentence.
-
#nativeLanguage ⇒ Object
Returns the version of the sentence in the user’s native language Please override in the concrete version.
- #nativeOnly_to_s ⇒ Object
-
#targetLanguage ⇒ Object
Returns the version of the sentence in the language being studied Please override in the concrete version.
- #targetOnly_to_s ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ ExampleSentence
Returns a new instance of ExampleSentence.
9 10 11 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 9 def initialize() @key = nil end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
7 8 9 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 7 def key @key end |
Instance Method Details
#nativeLanguage ⇒ Object
Returns the version of the sentence in the user’s native language Please override in the concrete version
15 16 17 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 15 def nativeLanguage() return "" end |
#nativeOnly_to_s ⇒ Object
25 26 27 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 25 def nativeOnly_to_s() return "#{key}\n\t#{self.nativeLanguage}" end |
#targetLanguage ⇒ Object
Returns the version of the sentence in the language being studied Please override in the concrete version
21 22 23 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 21 def targetLanguage() return "" end |
#targetOnly_to_s ⇒ Object
29 30 31 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 29 def targetOnly_to_s() return "#{key}\n\t#{self.targetLanguage}" end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/jldrill/model/ExampleSentence.rb', line 33 def to_s() return "#{key}\n\t#{self.targetLanguage}\n\t#{self.nativeLanguage}" end |