Class: Resume::Reference

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

Overview

Represents a personal reference

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#companyObject

Returns the value of attribute company.



89
90
91
# File 'lib/resume.rb', line 89

def company
  @company
end

#emailObject

Returns the value of attribute email.



88
89
90
# File 'lib/resume.rb', line 88

def email
  @email
end

#nameObject

Returns the value of attribute name.



86
87
88
# File 'lib/resume.rb', line 86

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



87
88
89
# File 'lib/resume.rb', line 87

def phone
  @phone
end

#relationshipObject

Returns the value of attribute relationship.



91
92
93
# File 'lib/resume.rb', line 91

def relationship
  @relationship
end

#titleObject

Returns the value of attribute title.



90
91
92
# File 'lib/resume.rb', line 90

def title
  @title
end

Class Method Details

.scaffold(name = nil) ⇒ Object



97
98
99
100
101
102
103
104
105
106
107
# File 'lib/resume.rb', line 97

def Reference.scaffold(name = nil)
    ref = Reference.new
    ref.name = name 
    ref.name = "Some Guy's Name" if !name
    ref.phone = rand(10).to_s + rand(10).to_s + rand(10).to_s + "-555-1212"
    ref.email = "[email protected]"
    ref.company = "Some Place"
    ref.relationship = "Boss"
    ref.title = "VP, Widgets"
    ref
end

Instance Method Details

#safe_emailObject



93
94
95
# File 'lib/resume.rb', line 93

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