substring_counter 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 32626fcceef0683edf563154e341d414f1638de6
4
- data.tar.gz: a5aa3536285de0eee3ef84ea64fbd99eb2dc0ac1
3
+ metadata.gz: 59af823d7546536de78f9f496ebd56de72cf995d
4
+ data.tar.gz: 96d8eaaf7eb61b4022c3726d97abab3ccfbcdc92
5
5
  SHA512:
6
- metadata.gz: 7bb2f26c9e8a4194126f5b6ece338c9e81592b6b204f5d690e4875c87f4502879f52d24cc76381da3891160a541efd6bd475c2a560e25dd033800724069ad1bb
7
- data.tar.gz: cebdd0675b24db32f30e083364f6e9509452f7453c30b74f9dec34f92db355ae0fbf15ac05155a9289b49b11ed427fb7f514c4de2c659615a5d2117b5937f161
6
+ metadata.gz: 3ad4af01fddc5abd1c039ae9f9d4c12cc8597b2f37ba6c8cd400bb1a33885232f39b715f691cabd6a3aef273479dd21ab4986a39d582f410bb1d7fa23eee567f
7
+ data.tar.gz: 158d38b9a71dccfc3e1d6eb74011418292b3550a7029a1365de3ae852e275258f299652c759f151fb5441418e58ddde19722b2145995e2017f10aac951804ed3
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # SubstringCounter
2
2
 
3
- 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/substring_counter`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This is simple ruby gem for counting number of occurances in string.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,18 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Counting occurances of single keyword
24
+
25
+ 2.3.1 :002 > 'string'.count_occurances('in')
26
+ => 1
27
+
28
+ Counting occurances of multiple keywords
29
+
30
+ 2.3.1 :003 > 'string with repeated substrings'.count_occurances('ing', 'string', 'sub')
31
+ => {"ing"=>2, "string"=>2, "sub"=>1}
32
+
33
+
34
+
26
35
 
27
36
  ## Development
28
37
 
@@ -32,7 +41,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
41
 
33
42
  ## Contributing
34
43
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/substring_counter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
44
+ Bug reports and pull requests are welcome on GitHub at https://github.com/GaneshNavale/substring_counter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
45
 
37
46
  ## License
38
47
 
@@ -1,3 +1,3 @@
1
1
  module SubstringCounter
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ganesh Navale"]
10
10
  spec.email = ["navaleganesh2011@gmail.com"]
11
11
 
12
- spec.summary = %q{This is an extension of the String class in Ruby to check number of occurances of subdtring in an given string}
12
+ spec.summary = %q{This is an extension of the String class in Ruby to check number of occurances of substring in an given string}
13
13
  spec.homepage = "https://github.com/GaneshNavale/substring_counter"
14
14
  spec.license = "MIT"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: substring_counter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ganesh Navale
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-01 00:00:00.000000000 Z
11
+ date: 2018-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,5 +97,5 @@ rubygems_version: 2.6.14
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: This is an extension of the String class in Ruby to check number of occurances
100
- of subdtring in an given string
100
+ of substring in an given string
101
101
  test_files: []