geekhub_tasks 1.3.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/geekhub_tasks.rb +16 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5be0c8d3b1fdc4da0d455c2295b0f17c559705c57efb4e35cdfc4f1679f4f289
4
- data.tar.gz: 19de5cad77b45e28af057c06d111ea6f71989c7c642f03a7d93572630cd02a30
3
+ metadata.gz: 25673d57491f1fefd010dc5647bd10c65d47739ec13dd828924fbecf413878d1
4
+ data.tar.gz: f1ddbb1f215affd2ac08abc0463195cfb4c1fa4e4adec8d2f4ab9589faee1d9d
5
5
  SHA512:
6
- metadata.gz: e2cae7bb5e76a4425b60969dbb1d28dc1ed45ba18afd15a235f2fec456e4f696b1a20f3678f76db2ee7241bb4f9fc8a1335800463a900eb22fb555db0889ad6d
7
- data.tar.gz: 2fd478c8f6c7d72dbfb8a2f9c7ae5b7fa44901112c2f06056c89a3b86dc385236c9119bc12f0ac0fa9c5ff089b2a26c7bb9514133be501734f437b2f0035c7cd
6
+ metadata.gz: d9d9e62dfc706d01356872321d55436fa8b23684ac388967f80602193d921c8a364f230f11ced12bde75d10118668ea393b2561a333f02309d4edcf4ca3b0038
7
+ data.tar.gz: 53e355d9401e0399d32938837449b7a1a9fcf074d013f1a85cc7cc026af1ec9c7da6c014f1518af18f89aff00a114717943abe1de5fefe9dbdfc09e3cb3fa2b5
data/lib/geekhub_tasks.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class GeekHubTasks
2
2
 
3
- def self.area__hyptenuse_triangle(a, b)
3
+ def self.hyptenuse_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 }
@@ -27,11 +27,11 @@ class GeekHubTasks
27
27
  { s: s }
28
28
  end
29
29
 
30
- def self.sides_triangle(a_1, b_1, r)
31
- c_1 = ( 180 - ( a_1 + b_1 ) )
32
- a = 2 * r * Math.sin(a_1 * ( Math::PI/180 ) ).round(2)
33
- b = 2 * r * Math.sin(b_1 * ( Math::PI/180 ) ).round(2)
34
- c = 2 * r * Math.sin(c_1.to_i * ( Math::PI/180 ) ).round(2)
30
+ def self.sides_triangle(a1, b1, r)
31
+ c1 = ( 180 - ( a1 + b1 ) )
32
+ a = 2 * r * Math.sin(a1 * ( Math::PI/180 ) ).round(2)
33
+ b = 2 * r * Math.sin(b1 * ( Math::PI/180 ) ).round(2)
34
+ c = 2 * r * Math.sin(c1.to_i * ( Math::PI/180 ) ).round(2)
35
35
  { a: a, b: b, c:c }
36
36
  end
37
37
 
@@ -40,16 +40,16 @@ class GeekHubTasks
40
40
  { s: s }
41
41
  end
42
42
 
43
- def self.distance_between_two_points(x_1, x_2, y_1, y_2)
44
- point_1 = (x_2 - x_1)
45
- point_2 = (y_2 - y_1)
46
- s = Math.sqrt(point_1.to_i**2 + point_2.to_i**2).round(2)
43
+ def self.distance_between_two_points(x1, x2, y1, y2)
44
+ point1 = (x2 - x1)
45
+ point2 = (y2 - y1)
46
+ s = Math.sqrt(point1.to_i**2 + point2.to_i**2).round(2)
47
47
  { s: s }
48
48
  end
49
49
 
50
- def self.volume(v_1, t_1, v_2, t_2)
51
- z = v_1 + v_2
52
- t = ( ( v_1 * t_1 ) + ( v_2 * t_2 ) )/z.to_i
50
+ def self.volume(v1, t1, v2, t2)
51
+ z = v1 + v2
52
+ t = ( ( v1 * t1 ) + ( v2 * t2 ) )/z.to_i
53
53
  { v: z,
54
54
  t: t }
55
55
  end
@@ -282,7 +282,7 @@ class GeekHubTasks
282
282
  { x1: x1, x2: x2 }
283
283
  end
284
284
 
285
- def self.gsub(n)
285
+ def self.redacted_text(n)
286
286
  n.downcase!
287
287
  if n.to_s.gsub!(/!/, ".")
288
288
  s = "Your redacted string is #{n}"
@@ -378,7 +378,7 @@ class GeekHubTasks
378
378
  { r: r }
379
379
  end
380
380
 
381
- def self.new(v1, v2, a1, a2, s)
381
+ def self.hypot(v1, v2, a1, a2, s)
382
382
  result = ( (-(v1+v2)+Math.sqrt( ( (v1+v2) ** 2 )+ 2 * ( a1 + a2 ) * s ) )/( a1 + a2 ) ).round(0)
383
383
  { result: result }
384
384
  end
@@ -392,7 +392,7 @@ class GeekHubTasks
392
392
  { :p => p}
393
393
  end
394
394
 
395
- def self.children(n)
395
+ def self.child_children(n)
396
396
  z = n.gsub!(/child/, "children")
397
397
  { :p => "#{z}" }
398
398
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geekhub_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maks Gostroushko