osm 1.2.18.dev.3 → 1.2.18.dev.4

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 (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/osm/member.rb +17 -11
  3. data/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDIwNmY3MDkyY2IxNWFkMmY5MGE2YTY1MjdhOTY3YjY2M2I2ZGYyMw==
4
+ NjNiMTE0Mzc1NGY0Njk2M2RlODNhOTQzN2M1ZWQxZTZiYWYzYWY5Ng==
5
5
  data.tar.gz: !binary |-
6
- NjAyMWUwMGU4ZmQ1ODc3MmQ2MTQyN2RmZjA5OGE5NDNhZjk2NDE1ZQ==
6
+ MGYzNzkyM2EwMmE0MzUyMTdjN2ExMjNhMDQyOTU2ZTI2ODZmOTJjOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGU5OGEyYzgyZDM3NDJmM2Y1ZjM3ZDk3MTdkZjg4Yzk4MGE1YzdlZDAzZmU2
10
- MTBhNzMwNTUzMzYzMjdjNjcxNWJiOGJhMTEwZDlmYjUwMDY5OWE4NzE4ODcy
11
- MGNkNzFlN2Q3NjUwM2M5ZmE5NmViMzdjOTM4NTA3NTlhN2RiMmU=
9
+ ZmM5YzYwZThmZmIwMjNjOGJhNjk5YjUxMzExODYyNmQ3M2MyNzQ3YTRmNDUw
10
+ M2E4YjRkNGU1ZDMyZmQ0Y2E3YWYzMWI4OGZjMjA4Y2FmZWNhODM2YTIwOTQx
11
+ N2JjYmY5NTQ4ZTcxMGZlMDgxNzQ2YWY1ZTZmNTg3M2QxN2U2Y2I=
12
12
  data.tar.gz: !binary |-
13
- M2FkMWEyODQxZDFmZWYzYWZiNDEyMDUwNTlkNjlhNGE5NTc5NDc0NTFiZjIw
14
- YjkyMGE0MTRlNmU0ZjM1OWEwNzMwNjFhMjBhMmNmNzk5MWE2ZDVlMGJmZWI1
15
- MGVhNTZhNGMyNmJiNGY5MGQ4NGZlOWUxMDYyYTFhNjFjN2ZlNjI=
13
+ NzFjYzc0MjBhY2JhNmQ1ZGZmMjUxMDU0YzI2ZmJjN2YyNGNkOWU4Y2JkYmI1
14
+ ZjRhNmVlNjIwNDg5NzM3MDE5ZWI3OGY3OTM1ZmUwZDBmY2VmZDBhYjI1ODQx
15
+ MjdkODlmNjlhODU5YThlYTdlYzA4N2Q2ZDM2ZmNiOGQxNjRlYzI=
@@ -585,6 +585,17 @@ module Osm
585
585
  [email_1, email_2].select{ |e| !e.blank? }
586
586
  end
587
587
 
588
+ # Get an array of all emails for the contact in a format which includes their name
589
+ # @return [Array<String>]
590
+ def all_emails_with_name
591
+ [email_1, email_2].select{ |e| !e.blank? }.map{ |e| "\"#{name}\" <#{e}>" }
592
+ end
593
+
594
+ end
595
+
596
+ module EnableableEmailableContact
597
+ include EmailableContact
598
+
588
599
  # Get an array of enabled emails for the contact
589
600
  # @return [Array<String>]
590
601
  def enabled_emails
@@ -594,12 +605,6 @@ module Osm
594
605
  emails.select{ |e| !e.blank? }
595
606
  end
596
607
 
597
- # Get an array of all emails for the contact in a format which includes their name
598
- # @return [Array<String>]
599
- def all_emails_with_name
600
- [email_1, email_2].select{ |e| !e.blank? }.map{ |e| "\"#{name}\" <#{e}>" }
601
- end
602
-
603
608
  # Get an array of enabled emails for the contact in a format which includes their name
604
609
  # @return [Array<String>]
605
610
  def enabled_emails_with_name
@@ -610,7 +615,7 @@ module Osm
610
615
  end
611
616
  end
612
617
 
613
- module PhoneableContact
618
+ module EnableablePhoneableContact
614
619
  # Get an array of enabled phone numbers for the contact
615
620
  def enabled_phones
616
621
  phones = []
@@ -682,8 +687,8 @@ module Osm
682
687
 
683
688
 
684
689
  class MemberContact < Osm::Member::Contact
685
- include EmailableContact
686
- include PhoneableContact
690
+ include EnableableEmailableContact
691
+ include EnableablePhoneableContact
687
692
  # @!attribute [rw] email_1
688
693
  # @return [String] the primary email address for the member
689
694
  # @!attribute [rw] email_2
@@ -717,8 +722,8 @@ module Osm
717
722
 
718
723
 
719
724
  class PrimaryContact < Osm::Member::Contact
720
- include EmailableContact
721
- include PhoneableContact
725
+ include EnableableEmailableContact
726
+ include EnableablePhoneableContact
722
727
  # @!attribute [rw] email_1
723
728
  # @return [String] the primary email address for the contact
724
729
  # @!attribute [rw] email_2
@@ -752,6 +757,7 @@ module Osm
752
757
 
753
758
 
754
759
  class EmergencyContact < Osm::Member::Contact
760
+ include EmailableContact
755
761
  # @!attribute [rw] email_1
756
762
  # @return [String] the primary email address for the contact
757
763
  # @!attribute [rw] email_2
data/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Osm
2
- VERSION = "1.2.18.dev.3"
2
+ VERSION = "1.2.18.dev.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.18.dev.3
4
+ version: 1.2.18.dev.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gauld