Class: HealthcarePhony::Email
- Inherits:
-
Object
- Object
- HealthcarePhony::Email
- Defined in:
- lib/healthcare_phony/email.rb
Overview
Public: Generate a fake email address
Instance Attribute Summary collapse
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#equipment_type ⇒ Object
Returns the value of attribute equipment_type.
-
#use_code ⇒ Object
Returns the value of attribute use_code.
Instance Method Summary collapse
-
#initialize(init_args = {}) ⇒ Email
constructor
A new instance of Email.
Constructor Details
#initialize(init_args = {}) ⇒ Email
10 11 12 13 14 15 16 17 18 |
# File 'lib/healthcare_phony/email.rb', line 10 def initialize(init_args = {}) @set_blank = !init_args[:blank].nil? && Helper.random_with_blank('X', init_args[:blank]) == '' @email_address = Faker::Internet.email @email_address = '' unless @set_blank == false @use_code = @email_address == '' ? '' : 'NET' @use_code = '' unless @set_blank == false @equipment_type = @email_address == '' ? '' : 'X.400' @equipment_type = '' unless @set_blank == false end |
Instance Attribute Details
#email_address ⇒ Object
Returns the value of attribute email_address.
6 7 8 |
# File 'lib/healthcare_phony/email.rb', line 6 def email_address @email_address end |
#equipment_type ⇒ Object
Returns the value of attribute equipment_type.
6 7 8 |
# File 'lib/healthcare_phony/email.rb', line 6 def equipment_type @equipment_type end |
#use_code ⇒ Object
Returns the value of attribute use_code.
6 7 8 |
# File 'lib/healthcare_phony/email.rb', line 6 def use_code @use_code end |