uniq-calculator 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c280899ec0d1451ffaa221b9421759d93041c7b1593a7754b537a430003652f1
4
+ data.tar.gz: b064ee9142af89da5f04e6235e98dfdae6af24d4ce85ff4a1eda2f400e4e4bc1
5
+ SHA512:
6
+ metadata.gz: 4545517d03c2f7f0402a06a551d3a3c05ed97960c2e2c830b95c62104e5bd751548fbff8e5cfa7d19a1ce241d34476d9dc33844f6ca1ad9a4c36074349ac8571
7
+ data.tar.gz: 3dec3fcb3288bbd2eebecff3a83984832e9ee9b9ff9c8b579306a2a0f396a38c332e657f1acfc99dac75e0ffb308d980385c0b316db71380d8038ff3b27f346f
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # UniqCalculator
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/uniq_calculator`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ ```bash
14
+ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ ```
16
+
17
+ If bundler is not being used to manage dependencies, install the gem by executing:
18
+
19
+ ```bash
20
+ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/uniq_calculator.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module UniqCalculator
4
+ VERSION = "1.0.0"
5
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "uniq_calculator/version"
4
+
5
+ module CalculatorGem
6
+ class Calculator
7
+ def add(a, b)
8
+ a + b
9
+ end
10
+
11
+ def subtract(a, b)
12
+ a - b
13
+ end
14
+
15
+ def multiply(a, b)
16
+ a * b
17
+ end
18
+
19
+ def divide(a, b)
20
+ raise ArgumentError, "Cannot divide by zero" if b == 0
21
+ a.to_f / b
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,4 @@
1
+ module UniqCalculator
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: uniq-calculator
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - chirag garg
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-05-15 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: This gem provides basic arithmetic operations such as addition, subtraction,
14
+ multiplication, and division using a simple Ruby interface.
15
+ email:
16
+ - chiraggargror@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - README.md
22
+ - Rakefile
23
+ - lib/uniq_calculator.rb
24
+ - lib/uniq_calculator/version.rb
25
+ - sig/uniq_calculator.rbs
26
+ homepage: https://github.com/chirag-garg-dev/uniq_calculator
27
+ licenses: []
28
+ metadata:
29
+ homepage_uri: https://github.com/chirag-garg-dev/uniq_calculator
30
+ source_code_uri: https://github.com/chirag-garg-dev/uniq_calculator
31
+ changelog_uri: https://github.com/chirag-garg-dev/uniq_calculator
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.0
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubygems_version: 3.5.22
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: A simple Ruby calculator gem
51
+ test_files: []