oh_my_method 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/oh_my_method/string.rb +8 -0
- data/lib/oh_my_method/version.rb +1 -1
- data/spec/oh_my_method/string_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 905eeb3d2a3e0d615a7f017a20e413bebc300722
|
4
|
+
data.tar.gz: 09a6f2550bbcb436b173cfa9d6a622dbfd8b7a41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6c5d1be80889e5e531748f6f280a12ef465d8f0621aab1209ae0b98dfc0f7bd77d3afbd6e10f64b3af72b1a21ec92140d38cab11268d24ed543ae4281d2a6c
|
7
|
+
data.tar.gz: 8003274bafa52dcbca25bb4992cc7b9d0c0f12451b0cd5cfe5d2030fbef11fb80d43da7a3e65a006d7ed92f22de509048463a4426c70eeb66ce4096910e6c310
|
data/lib/oh_my_method/string.rb
CHANGED
data/lib/oh_my_method/version.rb
CHANGED
@@ -7,4 +7,17 @@ describe "String Class" do
|
|
7
7
|
expect("Heeeh".palindrome?).to eq false
|
8
8
|
expect("ABCBA".palindrome?).to eq true
|
9
9
|
end
|
10
|
+
|
11
|
+
it "middle_with?" do
|
12
|
+
expect("hello".middle_with?("ell")).to eq true
|
13
|
+
expect("hello".middle_with?("ello")).to eq false
|
14
|
+
expect("hello".middle_with?("hel")).to eq false
|
15
|
+
expect("ABABA".middle_with?("BAB")).to eq true
|
16
|
+
end
|
17
|
+
|
18
|
+
it "sum_digit" do
|
19
|
+
expect("11111".sum_digit).to eq 5
|
20
|
+
expect("12321".sum_digit).to eq 9
|
21
|
+
expect("123456789".sum_digit).to eq 45
|
22
|
+
end
|
10
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oh_my_method
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- siman-man
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|