Sha256: 4996826d7367d3434bcac77f94703e68baf763ec00b14e749363675f9f1e03f6

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbPersonContact
    class PersonContact
      include Playbook::Props

      partial "pb_person_contact/person_contact"

      prop :contacts, type: Playbook::Props::HashArray, default: []
      prop :first_name
      prop :last_name

      def wrong_contacts
        contacts.select {|contact| contact[:contact_type] == "wrong number" }
      end

      def valid_contacts
        contacts.select {|contact| contact[:contact_type] != "wrong number" }
      end

      def classname
        generate_classname("pb_person_contact_kit")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-2.9.8 app/pb_kits/playbook/pb_person_contact/person_contact.rb