addressbook_txt 0.1.0 → 0.1.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/lib/addressbook_txt.rb +6 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5d29d73df08ceb15651585e3741531b73ac0e135
|
|
4
|
+
data.tar.gz: 762380a39fe70225429f6e9e4e73280e89290b54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 162772bd07f96484bf50415d56e36c6c195c806f49798fc7e352975df48158c874434cfd3f53129fdae4e096b81af7d9d56a0f2edcfa7272203aa7380276dd3f
|
|
7
|
+
data.tar.gz: b21352f333642cd9e9fa525c68e48a7ce2327d3fc535cc008d4088c1d1b98a034e76637ca31c083d2bfecc035ba77ca11937afcce52e027cec78dfcb68ed22d4
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
5V�����kRz�?��n�[��]D�F�*���
|
|
2
|
+
MΉq]K'�������S��r�E��Go�uS�|����]��,b��3j�U��zR��)��(W�*�[��ђ#=U�AM��I��c�H�ީY{��ǧ0��S���:�8X�궓"������j5��G�x��� >��(��@�{�놋�����r�T,��@ա+���=��Hӭ��wu�i-�;v��F�Nx�K����n��+���X�
|
data/lib/addressbook_txt.rb
CHANGED
|
@@ -12,7 +12,7 @@ require 'fileutils'
|
|
|
12
12
|
#
|
|
13
13
|
# [x] create a new addressbook.txt file
|
|
14
14
|
# [x] read an existing addressbook.txt file
|
|
15
|
-
# [
|
|
15
|
+
# [x] search each entry using a keyword
|
|
16
16
|
# [ ] archive address entries on an annual basis
|
|
17
17
|
# [ ] search the archive using a keyword
|
|
18
18
|
|
|
@@ -49,6 +49,10 @@ class AddressbookTxt
|
|
|
49
49
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
def search(keyword)
|
|
53
|
+
dx.all.select {|r| r.x =~ /#{keyword}/i}
|
|
54
|
+
end
|
|
55
|
+
|
|
52
56
|
def to_s()
|
|
53
57
|
dx_to_s @dx
|
|
54
58
|
end
|
|
@@ -87,4 +91,4 @@ class AddressbookTxt
|
|
|
87
91
|
end
|
|
88
92
|
|
|
89
93
|
|
|
90
|
-
end
|
|
94
|
+
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|