te_reo_maori 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +1 -0
- data/exe/te_reo_maori +3 -1
- data/lib/te_reo_maori.rb +1 -0
- data/lib/te_reo_maori/version.rb +1 -1
- data/lib/te_reo_maori/whakahua.rb +5 -0
- data/lib/te_reo_maori/whakamatautau_pangarau.rb +18 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d7e033dd690ec5a8b082f109638dedcfca0ecd77ec637426486f283b905d229
|
4
|
+
data.tar.gz: 733fba9ba22ac5574c552fd9854c961737175e255fce0485ee5031d3958afb91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0f769a32c1154f0a7914b9f4929358223dfea55685ae46b18e2a5f3b89403135e5027c465977c3361eed96c47fe046df18a36a6ff99019d41189a80761c29c1
|
7
|
+
data.tar.gz: 5c84a699c686ec242211b051eb682b7abfc0633d6082fb355cac2cc511380c9e073f71bedee4eda849869ba5c909b300ddfcca5bbc31b28e6554cadaac152ae8
|
data/ChangeLog
CHANGED
data/exe/te_reo_maori
CHANGED
@@ -10,9 +10,11 @@ def putanga
|
|
10
10
|
end
|
11
11
|
|
12
12
|
extend Tau # Make numbers available
|
13
|
+
extend WhakamatautauPangarau
|
13
14
|
|
14
15
|
puts 'Nau mai haere mai. Welcome to this application for learning and interacting with Maori.'
|
15
16
|
puts 'Type "putanga" to exit'
|
17
|
+
puts 'Type "pangarau" for maths test'
|
16
18
|
puts 'Try and perform +, -, * (times), / (divide) with Maori'
|
17
19
|
puts 'The numbers are: '
|
18
20
|
Tau.rarangi.each do |tau, whakamaoritanga|
|
@@ -20,7 +22,7 @@ Tau.rarangi.each do |tau, whakamaoritanga|
|
|
20
22
|
end
|
21
23
|
puts 'If you type a number and press you will see Maori equivalent. Numbers > 10 must be wrapped in (). Greatest supported is 999'
|
22
24
|
puts 'Example of bigger numbers. 12: "tekau ma rua". Add 23 + 33: "(rua tekau ma toru) + (toru tekau ma toru)"'
|
23
|
-
puts 'See integer form by calling "
|
25
|
+
puts 'See integer form by calling "tau", e.g., "((rua tekau ma toru) + (toru tekau ma toru)).tau" '
|
24
26
|
puts 'If you have any ideas on how this can be improved add issue to https://gitlab.com/samuel-garratt/te_reo_maori/-/issues'
|
25
27
|
|
26
28
|
IRB.start(__FILE__)
|
data/lib/te_reo_maori.rb
CHANGED
data/lib/te_reo_maori/version.rb
CHANGED
@@ -6,6 +6,11 @@ class Integer
|
|
6
6
|
whakahua
|
7
7
|
end
|
8
8
|
|
9
|
+
# Numeric form of integer
|
10
|
+
def tau
|
11
|
+
to_s
|
12
|
+
end
|
13
|
+
|
9
14
|
# @param [Integer] upper_part Integer of number of 100s
|
10
15
|
# @param [String] lower_part Already translated part less than 100
|
11
16
|
def add_parts(upper_part, lower_part)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Math test
|
2
|
+
module WhakamatautauPangarau
|
3
|
+
# Mathematics. Start a maths test
|
4
|
+
def pangarau
|
5
|
+
puts 'Nau mai. Please type the answer in Teo Reo Maori (e.g "tahi" for 1) when prompted'
|
6
|
+
tau1 = rand(100).to_i
|
7
|
+
tau2 = rand(100).to_i
|
8
|
+
whakautu_tika = tau1 + tau2 + 1
|
9
|
+
puts "#{tau1.inspect} + #{tau2.inspect}?"
|
10
|
+
whakautu = eval(gets).to_i
|
11
|
+
if whakautu == whakautu_tika
|
12
|
+
puts 'Ka pai. Correct!'
|
13
|
+
else
|
14
|
+
puts "Incorrect. You put '#{whakautu.inspect} (#{whakautu})'.
|
15
|
+
Correct answer is '#{whakautu_tika.inspect} (#{whakautu_tika})'"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: te_reo_maori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Garratt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Tool to aid one to learn Maori and enable one to program in Maori.
|
14
14
|
email:
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- lib/te_reo_maori/tau.rb
|
36
36
|
- lib/te_reo_maori/version.rb
|
37
37
|
- lib/te_reo_maori/whakahua.rb
|
38
|
+
- lib/te_reo_maori/whakamatautau_pangarau.rb
|
38
39
|
- te_reo_maori.gemspec
|
39
40
|
homepage: https://gitlab.com/samuel-garratt/te_reo_maori
|
40
41
|
licenses:
|