calculator_demo 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/calculator_demo.rb +22 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ad1b9e33aff6cc061106da57be728b773ed06b656fb38a444318d985c160538
4
- data.tar.gz: eb59768f6f0893f84ea9aa8d9df54c781f702097d0720db0653a178c9616b1f3
3
+ metadata.gz: 70aeb7fb0c7433ff7925888a61f92432de9ae8c248b0e0354e10c541d9be9d5e
4
+ data.tar.gz: 5cac6ea47818a7898f734468a4ee2645f325431f1b2f4204213d1d185454470c
5
5
  SHA512:
6
- metadata.gz: e397eb9b16572ccfea4559a0c72e5df1728273db671d027e9301e9af99423f029fda1be44c2fb47c7a1d77fd6705d32dd9a35558d882335af7c0a99e8aa847bf
7
- data.tar.gz: 0caef30150d99f9a1aac0531f0b5b28053e33e45edc57af85acac94c7ba5405eff5af7dd3cd7d5fdbdbf4ed4d3830c5b96fe011a6ea82b1c5a9741fde441408a
6
+ metadata.gz: 16fd1488add79b1e60abc2cfe6e80a281689ddae6ab2f675fb731dc71da524db252fb18f55cb27c67ee560f698ff8c7135af8d38ad794e5a5b905305120dca75
7
+ data.tar.gz: 4a67bcc23d2d7c1ce6ed0f414951b3c0b3a2a8a18c31007458ef4b4b48e73d5aa29d151c2256f369f2c77e7b9f236b85a19b96015a5069bf6de6d8f463267bce
@@ -1,7 +1,28 @@
1
1
  module CalculatorDemo
2
2
  class Calci
3
- def addition(a,b)
3
+ ##perform addition
4
+ def add(a,b)
4
5
  return a+b
5
6
  end
7
+ ##perform substraction
8
+ def sub(a,b)
9
+ return a-b
10
+ end
11
+
12
+ ##perform multiplication
13
+ def mul(a,b)
14
+ return a*b
15
+ end
16
+
17
+ ##perform division
18
+ def div(a,b)
19
+ x = begin
20
+ a / b
21
+ rescue ZeroDivisionError
22
+ "You can't divide #{a} by #{b}"
23
+ end
24
+ return x
25
+ end
26
+
6
27
  end
7
28
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calculator_demo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hasmukh Rathod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Learn basics of GEM creation
13
+ description: Basic functions added.
14
14
  email: hasmukh@thinkbiz.co.in
15
15
  executables: []
16
16
  extensions: []