Class: LanguageCards::Grapheme

Inherits:
Object
  • Object
show all
Defined in:
lib/language_cards/models/grapheme.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#translationObject (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

#displayObject



10
11
12
# File 'lib/language_cards/models/grapheme.rb', line 10

def display
  @grapheme
end

#to_sObject



14
15
16
# File 'lib/language_cards/models/grapheme.rb', line 14

def to_s
  @grapheme
end