Class: Resume::ContactInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/resume.rb

Overview

Contact information, such as name, email, address

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

An Address object



254
255
256
# File 'lib/resume.rb', line 254

def address
  @address
end

#emailObject

Returns the value of attribute email.



252
253
254
# File 'lib/resume.rb', line 252

def email
  @email
end

#nameObject

Returns the value of attribute name.



251
252
253
# File 'lib/resume.rb', line 251

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



255
256
257
# File 'lib/resume.rb', line 255

def phone
  @phone
end

Class Method Details

.scaffoldObject



261
262
263
264
265
266
267
268
# File 'lib/resume.rb', line 261

def ContactInfo.scaffold
    contact = ContactInfo.new
    contact.name = "John J. Programmer"
    contact.email = "[email protected]"
    contact.address = Address.scaffold
    contact.phone = "202-555-1212"
    contact
end

Instance Method Details

#safe_emailObject



257
258
259
# File 'lib/resume.rb', line 257

def safe_email
    return @email.gsub(/@/," at ").gsub(/\./," dot ")
end