xita_mean 0.1.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: 190dd57d16c92c195f97dfea4b73318d23e6df4d080133f9d7b2650230ab81cf
4
+ data.tar.gz: 90645fbf8db504c2fda58be8f2c19d6755b36b8e27449fe7d142c91dbe9a2de6
5
+ SHA512:
6
+ metadata.gz: 39d3a1929a580bc06be3f63bcc1b5ba022508830d3432b3d5a10dc00af020ed124dd63bacd22d4feb3b724ff6b4619bf2bf57db2db781527b6f3af0945ffebd4
7
+ data.tar.gz: f91fa539be56c71f2ac051eca5ec291a65cacf92960938e18b023ba525a7d615e813451b3a5dfab44517dc99928ce3eaf91a9244acb698fdf857efec9d2255e8
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in xita_mean.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # XitaMean
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/xita_mean`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_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
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ 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).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xita_mean.
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module XitaMean
4
+ VERSION = "0.1.0"
5
+ end
data/lib/xita_mean.rb ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "xita_mean/version"
4
+
5
+ module XitaMean
6
+ class Error < StandardError; end
7
+ # Your code goes here...
8
+
9
+ class Calc
10
+ def self.mean(arr)
11
+ arr.compact.sum / arr.length
12
+ end
13
+ end
14
+ end
data/sig/xita_mean.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module XitaMean
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xita_mean
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - xitarps
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-05-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Essa gems soma os numeros de um array e divide pelo tamanho do array
14
+ email:
15
+ - xitarps@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rspec"
21
+ - Gemfile
22
+ - README.md
23
+ - Rakefile
24
+ - lib/xita_mean.rb
25
+ - lib/xita_mean/version.rb
26
+ - sig/xita_mean.rbs
27
+ homepage: https://github.com/xitarps
28
+ licenses: []
29
+ metadata:
30
+ homepage_uri: https://github.com/xitarps
31
+ source_code_uri: https://github.com/xitarps
32
+ changelog_uri: https://github.com/xitarps
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 2.6.0
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubygems_version: 3.4.6
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: Gem para calcular media de um array
52
+ test_files: []