-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathakkusativ_or_dativ.rb
80 lines (78 loc) · 3.12 KB
/
akkusativ_or_dativ.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
require './telegram_response_creator'
class AkkusativOrDativ
@@prints = {
:prapositionen => {
:akkusativ => "
**AKK**
- bis (till)
- gegen (against, towards)
- um (location: around / time: at)
- durch (through)
- ohne (without)
- entlang (along)
",
:dativ => "
**DAT**
- aus (from originally)
- von (from, of)
- zu (to)
- nach (to - streets, cities, countries, after)
- vor (before, ago)
- mit (with)
- seit (since)
- bei (at - name of people/companies, during/while)
- Gegenüber* (in front of (will come after the noun))
",
},
:fragen => {
:akkusativ => "
**AKK**
- Wohin? Where to (with action)
- Was? what
- Wen? who
",
:dativ => "
**DAT**
- Wo? where
- Wann? when
- Wem? whom
",
}
}
def self.MessageLogic(telegramResponseCreator, messageData)
case
when messageData == 'akkusativ_or_dativ'
telegramResponseCreator.inlineKeyboardButtons(
[
{:text => 'Präpositionen', :callback_data => 'akkusativ_or_dativ_prapositionen'},
{:text => 'Fragen', :callback_data => 'akkusativ_or_dativ_fragen'}
],
'Präpositionen or Fragen?'
)
when messageData == 'akkusativ_or_dativ_prapositionen'
telegramResponseCreator.inlineKeyboardButtons(
[
{:text => 'Akkusativ', :callback_data => 'akkusativ_or_dativ_prapositionen_akkusativ'},
{:text => 'Dativ', :callback_data => 'akkusativ_or_dativ_prapositionen_dativ'}
],
'Akkusativ or Dativ?'
)
when messageData == 'akkusativ_or_dativ_prapositionen_akkusativ'
telegramResponseCreator.textResponse(@@prints[:prapositionen][:akkusativ])
when messageData == 'akkusativ_or_dativ_prapositionen_dativ'
telegramResponseCreator.textResponse(@@prints[:prapositionen][:dativ])
when messageData == 'akkusativ_or_dativ_fragen'
telegramResponseCreator.inlineKeyboardButtons(
[
{:text => 'Akkusativ', :callback_data => 'akkusativ_or_dativ_fragen_akkusativ'},
{:text => 'Dativ', :callback_data => 'akkusativ_or_dativ_fragen_dativ'}
],
'Akkusativ or Dativ?'
)
when messageData == 'akkusativ_or_dativ_fragen_akkusativ'
telegramResponseCreator.textResponse(@@prints[:fragen][:akkusativ])
when messageData == 'akkusativ_or_dativ_fragen_dativ'
telegramResponseCreator.textResponse(@@prints[:fragen][:dativ])
end
end
end