my_string_extend_slw.gemspec 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/my_string_extend_slw.rb +10 -0
  3. metadata +46 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0b1ed46611a9c3af1539507fb303d1325ae1e10c
4
+ data.tar.gz: 9b4f8cb17be2eeb7324f71d2781fd4054543ac23
5
+ SHA512:
6
+ metadata.gz: 1c8c47499ad94a87298efbd44eb0bec2ffefe36a2c5bd6fa8cc2512a7f9e4744832391d13515f2b94d95fc25003fc2ea5a8640a76bfbbb4eb2a280f1db192814
7
+ data.tar.gz: b5b5dc1c4637141127f0a9d92660eec952a64d27ad9682a1d0249f22f44ed853790feb32b636490964726008e115fd1c4bc98dfaad8d76ec417883d250bb8f85
@@ -0,0 +1,10 @@
1
+ # my_string_extend_slw.rb
2
+ class String
3
+ def djb2Hash
4
+ self.split("").each do |c|
5
+ hashConst = 5381
6
+ hashConst = ((hashConst << 5) + hashConst) + c.ord
7
+ return hashConst
8
+ end
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: my_string_extend_slw.gemspec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Sylvester Willis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-02-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: The library opens up the string class and adds a method djb2Hash, which
14
+ returns the djb2 hash of the given string.
15
+ email:
16
+ - swillis16@student.gsu.edu
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/my_string_extend_slw.rb
22
+ homepage: http://github.com/swillis16
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.0.3
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: String Extend
46
+ test_files: []