rot19 1.1.0 → 1.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rot19.rb +11 -23
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9be006c186ddd4815e1d8bc306c5336c54cb0610
4
- data.tar.gz: e4141881930c6702862bd8cf65262e399eb975a4
3
+ metadata.gz: 66af58553d6925ba9bf9a17465a8f9caaa46cf2e
4
+ data.tar.gz: e8634a915a9374f7b0a66eb0d79980410f9752b9
5
5
  SHA512:
6
- metadata.gz: eeff039443dc7bd1f4c33a2459b01ae17b0ae9a2f2cc3105047c6a89ac84d7c5655818015f09e2b694e7def4e4212443eceeba8b10f3ca179566a9141e1ffa5c
7
- data.tar.gz: 399cd32f4aeb9188c84235318f2c138338da65c2151c87f905f12d59f0dd3efad8ba6ebd5b6772cd9049bde3cf5d9fc2bb0f1352e4d98d5db7e559abb8c83ca2
6
+ metadata.gz: 89bb0565647b86d37cc2dcc4a5631d4b1269d6a0f19c09da4546913359d711a338cb20d36491910a51bf96cb37d3845d1b9d69f4b7484d434c58a3efec984907
7
+ data.tar.gz: 6cef119a844e3d15d0ef708aa3b1652708b46c7439e20214759d78fb3df334d7ff735ce00c9038130d5cfd7b80ad551298c55648ced2dffa4b219c9f9ecc2218
@@ -1,24 +1,12 @@
1
- class Rot19
2
- def self.initialize(19, "sandeep")
3
- i = shift % alphabet.size #I like this
4
- @decrypt = alphabet
5
- @encrypt = alphabet[i..-1] + alphabet[0...i]
6
- end
7
-
8
- def encrypt(string)
9
- string.tr(@decrypt, @encrypt)
10
- end
11
-
12
- def decrypt(string)
13
- string.tr(@encrypt, @decrypt)
14
- end
1
+ class Hola
2
+ def self.hi(alphabet = ('a'..'z'))
3
+ alphabet.each_byte do |c|
4
+ puts c
5
+ end
6
+ end
15
7
  end
16
-
17
- # puts "Enter Original Password"
18
- # list = gets
19
- # #original_text = "this is rot19 encryption whoo"
20
- # convert_text = Rot19.new(19).encrypt(list)
21
- # printf "Original Password is => "
22
- # puts list
23
- # printf "rot19 encryption password is => "
24
- # puts convert_text
8
+ puts "Enter the String"
9
+ list = gets
10
+ convert_string = Hola.new.hi(list)
11
+ printf "Converted Password is => "
12
+ puts list
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rot19
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandeep Chourey
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-06-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: A simple gem for Gem for convert String to Rot19(rotation)!
13
+ description: A simple rot19 gem
14
14
  email: schourey1988@gmail.com
15
15
  executables: []
16
16
  extensions: []
@@ -40,5 +40,5 @@ rubyforge_project:
40
40
  rubygems_version: 2.4.3
41
41
  signing_key:
42
42
  specification_version: 4
43
- summary: Gem for convert String to Rot19(rotation)!
43
+ summary: rot19!
44
44
  test_files: []