basic_math 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/basic_math.rb +14 -0
- data/lib/basic_math/basic.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c073d35816a7df0c781a8c540861fd4cda1bba9fda2fc370b7782cfbe6e33eb
|
4
|
+
data.tar.gz: 4179f76467013bb9bab18bfcaebc7f9cd3d16e62b3b9037102dac08edb066363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 914191ea9f0b14af71ec7141a9076acadd5a57a551acda77333821d766c1bd3c71801376eb3a95ebab1db52a4812ec398e7560e15b16ddcd598a2ea0af4ab5aa
|
7
|
+
data.tar.gz: 16277b2dd1860eaaba8eb0f2af7c53b4dd9df096a1bdf10f219b966bfbff7daa5b8ae4d23bec1fbbd6275b31958dd89d82ec8e4e28dfbc4ae8b6137e76e8a175
|
data/bin/basic_math.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'basic_math'
|
2
|
+
|
3
|
+
@parameter1 = Integer(ARGV[0]) rescue nil
|
4
|
+
@parameter2 = Integer(ARGV[2]) rescue nil
|
5
|
+
|
6
|
+
begin
|
7
|
+
if (@parameter1.is_a? Numeric) && (@parameter2.is_a? Numeric)
|
8
|
+
puts BasicMath.cal @parameter1, ARGV[1], @parameter2
|
9
|
+
else
|
10
|
+
raise
|
11
|
+
end
|
12
|
+
rescue
|
13
|
+
puts "The first and last parameter must be a number"
|
14
|
+
end
|
data/lib/basic_math/basic.rb
CHANGED
metadata
CHANGED
@@ -1,24 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basic_math
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tran Nguyen Kha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Basic Math: Plus, Subtract, multiplication, Divide'
|
14
14
|
email: khatn@neo-lab.vn
|
15
|
-
executables:
|
15
|
+
executables:
|
16
|
+
- basic_math.rb
|
16
17
|
extensions: []
|
17
18
|
extra_rdoc_files: []
|
18
19
|
files:
|
20
|
+
- bin/basic_math.rb
|
19
21
|
- lib/basic_math.rb
|
20
22
|
- lib/basic_math/basic.rb
|
21
|
-
homepage: https://rubygems.org/gems/
|
23
|
+
homepage: https://rubygems.org/gems/basic_math
|
22
24
|
licenses:
|
23
25
|
- MIT
|
24
26
|
metadata: {}
|