Class: LanguageCards::Grapheme
- Inherits:
-
Object
- Object
- LanguageCards::Grapheme
- Defined in:
- lib/language_cards/models/grapheme.rb
Instance Attribute Summary collapse
-
#translation ⇒ Object
readonly
Returns the value of attribute translation.
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(grapheme, translation) ⇒ Grapheme
constructor
A new instance of Grapheme.
- #to_s ⇒ Object
Constructor Details
#initialize(grapheme, translation) ⇒ Grapheme
Returns a new instance of Grapheme.
5 6 7 8 |
# File 'lib/language_cards/models/grapheme.rb', line 5 def initialize grapheme, translation @grapheme = grapheme @translation = Array(translation) end |
Instance Attribute Details
#translation ⇒ Object (readonly)
Returns the value of attribute translation.
4 5 6 |
# File 'lib/language_cards/models/grapheme.rb', line 4 def translation @translation end |
Instance Method Details
#display ⇒ Object
10 11 12 |
# File 'lib/language_cards/models/grapheme.rb', line 10 def display @grapheme end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/language_cards/models/grapheme.rb', line 14 def to_s @grapheme end |