new_calculator 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c8e07a9496bf87c058b7063aec4d2343a7a27228a381cd8ddf70fd48ec22c18
4
- data.tar.gz: 8175c0eada75a8793e1c7280fdf0111e34905d7b03e435645058583a40d0ba06
3
+ metadata.gz: 0a1a858ae4e1750a21c953bf087883e2246940f84e79f3a9e44977e90e925dff
4
+ data.tar.gz: 9c4a25375b6015a6d0c780a39261d539946b031984821da6f2b05a081e74f7b6
5
5
  SHA512:
6
- metadata.gz: 11a98eac584a50d81660602d51067871ca713f960966c65e14b815f3d3a4b56b6599c618c079b6635b3d8c6ff0132135ce0eebaa8ad64abafb2213cb35666cd9
7
- data.tar.gz: 209ad0d76ce7950fdca0cde2a2d47c53221cdd87cec835eb59d53a9dc52698c773453d17306a70f04a6c1d07306f4a1db238978a986c7e3e58c4b8bb9afc37b0
6
+ metadata.gz: bfa340f17cc0ccb7394f63ae2b9b3d32f8f404b2e9f2be5967ec8d7d297c658d9e8cbe66f0f6f663880346301119e07efedb9b820229e7850e371756da756e8c
7
+ data.tar.gz: 956614a2283105cecbfec58dc5bf8b8c534b89ddd0b3fa6500c6a827c536cbdcc96b0b67cc7268d46826ff426eaed4921c62a663c378e574b67a97a30921940a
@@ -16,4 +16,8 @@ module NewCalculator
16
16
  def self.div(a = 1, b = 1)
17
17
  a.to_f / b.to_f
18
18
  end
19
+
20
+ def self.factorial(a = 1)
21
+ (1..a).inject(:*)
22
+ end
19
23
  end
@@ -1,3 +1,3 @@
1
1
  module NewCalculator
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["luifeavila@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Calculator}
13
- spec.description = %q{Sum And Subtr}
13
+ spec.description = %q{Sum, Subtr, Multiplication, Division and Factorial}
14
14
  spec.homepage = "https://rubygems.org/profiles/luifer321"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: new_calculator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Avila
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- description: Sum And Subtr
55
+ description: Sum, Subtr, Multiplication, Division and Factorial
56
56
  email:
57
57
  - luifeavila@gmail.com
58
58
  executables: []