Class: HealthcarePhony::CellPhoneNumber

Inherits:
PhoneNumber show all
Defined in:
lib/healthcare_phony/cell_phone_number.rb

Overview

Public: Generates a fake cell phone number

Instance Attribute Summary

Attributes inherited from PhoneNumber

#area_code, #country_code, #equipment_type, #exchange_code, #number, #subscriber_number, #use_code

Instance Method Summary collapse

Constructor Details

#initialize(**init_args) ⇒ CellPhoneNumber

Public: Initializes a cell phone number. Pass in hash of different parameters, currently this includes: blank - An integer representing the % of times phone number components should be blank. use_code - Allows specification of the phone use code (PID.13.2) equipment_type - Allows specification of the phone equipment type (PID.13.3)



12
13
14
15
16
17
18
# File 'lib/healthcare_phony/cell_phone_number.rb', line 12

def initialize(**init_args)
  super(init_args)
  @use_code = init_args[:use_code].nil? ? 'ORN' : init_args[:use_code]
  @use_code = '' unless @set_blank == false
  @equipment_type = init_args[:equipment_type].nil? ? 'CP' : init_args[:equipment_type]
  @equipment_type = '' unless @set_blank == false
end