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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6be7f563f146ed0557a69e8f3ff7b889b258fef3
4
- data.tar.gz: 2e20375e9744639159d0369d6ad26238f379ca14
3
+ metadata.gz: 5d29d73df08ceb15651585e3741531b73ac0e135
4
+ data.tar.gz: 762380a39fe70225429f6e9e4e73280e89290b54
5
5
  SHA512:
6
- metadata.gz: 47c17b110eab42a2bc2200e03d00be607b16e0584a04c6c82d5dc0bd7fc6a470d6c746ecc6cca3fd68b23d8f400f0e00e56ea1439e6caf99c6c9c6518c8fdc86
7
- data.tar.gz: 14abba25611b670e35843a0682e7203a61446ecce55be670a7ba9c5807b106e888ae785ed0e53d553835a4c0188a9abe785575710d51a846be4f31dddcef344a
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
- ��a *d���'ͺ^x��� <,j�Ѷ�ފ�M��`������JL��[R������J��M��P�cQ���͡e���H��/� �fԌ�"����W�o?$�PS�F�7+���OR����F3\�d�;s�|�|��U�&^�ٻN�c*~�n��e�k0 #4$Hw�"7q��s�s�)��"0��Nj`k,>%q"+� �@�V����.f ��׉�>(�5s�ƯǶ5�.��7M�Q�#�"n[W����fu��7
1
+ 5V�����kRz�?��n �[��]DF�*���
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�
@@ -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
- # [ ] search each entry using a keyword
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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addressbook_txt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file