ariva 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ariva.rb +6 -1
- data/lib/run.rb +22 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f640f10c238e1ea46a36e223456c04dd7281cbe13c538aa9a6dad4dfe2db014d
|
4
|
+
data.tar.gz: 7a6db58f1ef38e4c09a2741e9dd70d560b0e183815feb5dc38ad1dee81ab2f73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3be0bc30f141a40050c7b86455ac724cccd21eefe9dbeffae9f931a265450ad9e0ab1f4af389b6cae5beac6d8261268dc67046cea8cb7b0bf0d6903a5ef0263a
|
7
|
+
data.tar.gz: c3ff61e18d8f1fa81877cae0a88c9f3a978198ad8ed0cd3ba6176d2110fbef3e97c57dee6a1df7d56e112f2bc472d5b379e9d34023261e9d3875dea82259ffb4
|
data/lib/ariva.rb
CHANGED
data/lib/run.rb
CHANGED
@@ -1 +1,22 @@
|
|
1
|
-
|
1
|
+
ar = ENV.fetch('ar').split()
|
2
|
+
vars = {'~v' => '0.0.4'}
|
3
|
+
i = 0
|
4
|
+
|
5
|
+
while i < ar.length do
|
6
|
+
case ar[i]
|
7
|
+
when 'show'
|
8
|
+
if vars.include? ar[i + 1]
|
9
|
+
puts vars[ar[i + 1]]
|
10
|
+
i += 2
|
11
|
+
else
|
12
|
+
puts 'ERROR at word : ' + i.to_s
|
13
|
+
break
|
14
|
+
end
|
15
|
+
when 'set'
|
16
|
+
vars[ar[i + 1]] = ar[i + 2]
|
17
|
+
i += 3
|
18
|
+
else
|
19
|
+
puts 'ERROR at word : ' + i.to_s
|
20
|
+
break
|
21
|
+
end
|
22
|
+
end
|