jejefy 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c4d74d5122307584bca58ef66f147057a0f6850
4
- data.tar.gz: fa342b5ef25ac8d4f4f752eb3f9b0530f073c704
3
+ metadata.gz: cc98d7de7956161f578bb0f57d2db70f544aaedd
4
+ data.tar.gz: 2d0dfbdd46f7b452b60af31e92fd919b79647b8b
5
5
  SHA512:
6
- metadata.gz: 7ebe0056cae76efb180719e07b825a2ecbf7025b9308017c31e40d0fb852353845367bb664225d31f5f4c468d5f9c30244b4b44898288d5f5d376e87bbcb82bd
7
- data.tar.gz: 4991a6c8011ba2c177c6a4f7afb3fcddce1daa929eafe321b31b2d575613297ca5a7928c938eb48ef3848866fb5ff0c2bce2a34510b4802e4cb96d0a506469c5
6
+ metadata.gz: 7b6367c271cb3190bc59021bbc6c9452917c63664a095350bd9d7a53b42af52f83f9d7733cfb1b070285e94855872bb28be16d9bd229493ce2dcdcef91cf6647
7
+ data.tar.gz: a143e3d945f2689b8461eea8e3dc14b4a414d07518ab91235b6acd780d539451a9bd576a96b073f8e87010e87cc1c68b97261e6d0ea00995c2a3de980cbe96e0
data/lib/jejefy.rb CHANGED
@@ -4,5 +4,5 @@ require "jejefy/configuration"
4
4
 
5
5
  module Jejefy
6
6
  # Your code goes here...
7
- JEJEMON_ALPHABET = ["4", "b", "c", "D", "3", "f", "6", "h", "1", "j", "k", "7", "m", "N", "0", "p", "Q", "r", "5", "t", "u", "V", "w", "x", "Y", "z"]
7
+ VOWELS = %w{a e i o u A E I O U}
8
8
  end
@@ -3,20 +3,18 @@ class String
3
3
  str = self.gsub /a/, "4"
4
4
  str = str.gsub /e/, "3"
5
5
  str = str.gsub /o/, "0"
6
+ str = str.gsub /i/, "!"
6
7
 
7
8
  str
8
9
  end
9
10
 
10
11
  def vowel?
11
- self.split("").map do |c|
12
- c.send(:chck_vwl)
13
- end
12
+ self.split("").map { |c| c.send(:chck_vwl) }
14
13
  end
15
14
 
16
15
  private
17
16
 
18
17
  def chck_vwl
19
- vowels = %w{a e i o u A E I O U}
20
- vowels.include? self
18
+ Jejefy::VOWELS.include? self
21
19
  end
22
20
  end
@@ -1,3 +1,3 @@
1
1
  module Jejefy
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/spec/jejefy_spec.rb CHANGED
@@ -11,6 +11,16 @@ describe Jejefy do
11
11
  expect(str.jejefy).to eq "j03l"
12
12
  end
13
13
 
14
+ it "transforms o to 0" do
15
+ str = "moo"
16
+ expect(str.jejefy).to eq "m00"
17
+ end
18
+
19
+ it "transforms i to !" do
20
+ str = "king"
21
+ expect(str.jejefy).to eq "k!ng"
22
+ end
23
+
14
24
  it "checks if a letter is vowel" do
15
25
  letter = "joel"
16
26
  expect(letter.vowel?).to eq [false, true, true, false]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jejefy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez