geekhub_tasks 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geekhub_tasks.rb +11 -11
- 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: 7389c98ada444101334d2f25cfbe802ef494d0eed6abe2f0163530c20e9da548
|
4
|
+
data.tar.gz: 871bb7e2c1449b6eb55220314ec68469fb5aaae1f6d0c8206bd113d45e3c1db8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31e117ab62c27d40d465315892a844694276204874186aec1b70aa9856ce63e867b886f3905337ba4484be529790bcc8ad979a9cc2d9606ad6b7b7e27bc88f8f
|
7
|
+
data.tar.gz: '0918fb854a17374ad4ea977b3b93a1c1033470078021da68fd2bfd5b9b8e9c12e2c19ba8ace9c52d2d47c100ac624a390648da5c1461e1ff8ee8b34249d6c1ee'
|
data/lib/geekhub_tasks.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
class GeekHubTasks
|
2
2
|
|
3
|
-
def self.
|
3
|
+
def self.hypotenuse_triangle(a, b)
|
4
4
|
hypotenuse = Math.sqrt( ( a**2 ) + ( b**2 ) ).round(2)
|
5
5
|
area = ( a * b )/2
|
6
6
|
{ hypotenuse: hypotenuse, area: area }
|
7
7
|
end
|
8
8
|
|
9
|
-
def self.
|
9
|
+
def self.average_value(a, b)
|
10
10
|
average_ariphmetic = ( a + b )/2
|
11
11
|
average_geometric = Math.sqrt( a * b ).round(1)
|
12
12
|
{ average_ariphmetic: average_ariphmetic, average_geometric: average_geometric }
|
@@ -155,12 +155,12 @@ class GeekHubTasks
|
|
155
155
|
{ :p => p }
|
156
156
|
end
|
157
157
|
|
158
|
-
def self.age(
|
159
|
-
if
|
158
|
+
def self.age(age)
|
159
|
+
if age % 10 == 1 && age != 11
|
160
160
|
p = " Год "
|
161
|
-
elsif
|
161
|
+
elsif age >= 5 && age <= 20
|
162
162
|
p = " Лет "
|
163
|
-
elsif
|
163
|
+
elsif age % 10 <= 4 && age % 10 > 0
|
164
164
|
p = " Годa "
|
165
165
|
else
|
166
166
|
p = " Лет "
|
@@ -212,7 +212,7 @@ class GeekHubTasks
|
|
212
212
|
{ sol: x }
|
213
213
|
end
|
214
214
|
|
215
|
-
def self.
|
215
|
+
def self.belong_to_gap(a, b, c)
|
216
216
|
if a >= 1 && a <= 3
|
217
217
|
a = "belong to the gap"
|
218
218
|
else
|
@@ -293,10 +293,10 @@ class GeekHubTasks
|
|
293
293
|
{ :s => s }
|
294
294
|
end
|
295
295
|
|
296
|
-
def self.string
|
297
|
-
puts "Your string before readected: " + "#{
|
298
|
-
|
299
|
-
str1 = "Your string after readected: #{
|
296
|
+
def self.string_redacted(string)
|
297
|
+
puts "Your string before readected: " + "#{string}"
|
298
|
+
string.delete! "*"
|
299
|
+
str1 = "Your string after readected: #{string}"
|
300
300
|
{ :str1 => str1 }
|
301
301
|
end
|
302
302
|
|