Module: LearnJapanese

Defined in:
lib/learn-japanese.rb,
lib/learn-japanese/version.rb

Constant Summary collapse

VERSION =
'0.9.1'
NAME =
'learn-japanese'
HOMEPAGE =
'https://github.com/dvarrui/learn-japanese'

Class Method Summary collapse

Class Method Details

.choose_answer(level) ⇒ Object



19
20
21
22
# File 'lib/learn-japanese.rb', line 19

def self.choose_answer(level)
  show_help unless level > 0
  ChooseAnswerGame.new(level).run
end

.romajiObject



24
25
26
# File 'lib/learn-japanese.rb', line 24

def self.romaji
  RomajiGame.new.run
end

.short_answer(level) ⇒ Object



28
29
30
31
# File 'lib/learn-japanese.rb', line 28

def self.short_answer(level)
  show_help unless level > 0
  ShortAnswerGame.new(level).run
end

.show_helpObject



14
15
16
17
# File 'lib/learn-japanese.rb', line 14

def self.show_help
  puts "Usage: learn-japanese --help"
  exit 0
end

.show_versionObject



10
11
12
# File 'lib/learn-japanese.rb', line 10

def self.show_version
  puts "#{LearnJapanese::NAME} (version #{LearnJapanese::VERSION})"
end

.soundObject



33
34
35
# File 'lib/learn-japanese.rb', line 33

def self.sound
  SoundGame.new.run
end