Class: MultiformatCV::Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h = {}) ⇒ Contact

Create Contact instance

Example:

contact = MultiformatCV::Contact.new(title: 'Accountant', name: 'John Doe')

Parameters:

  • h (Hash) (defaults to: {})

    Instance initializer; keys MUST be strings

Options Hash (h):

  • 'name' (String)
  • 'title' (String)
  • 'email' (String)
  • 'phone' (String)
  • 'links' (Hash<String, String>)


25
26
27
28
29
30
31
# File 'lib/multiformatcv/contact.rb', line 25

def initialize(h = {})
  @name  = h['name']
  @title = h['title']
  @email = h['email']
  @phone = h['phone']
  @links = h['links']
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



2
3
4
# File 'lib/multiformatcv/contact.rb', line 2

def email
  @email
end

Hash of links

Example:

links = { github: 'https://www.github.com/john.doe/personal-dashboard' }


11
12
13
# File 'lib/multiformatcv/contact.rb', line 11

def links
  @links
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/multiformatcv/contact.rb', line 2

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



2
3
4
# File 'lib/multiformatcv/contact.rb', line 2

def phone
  @phone
end

#titleObject

Returns the value of attribute title.



2
3
4
# File 'lib/multiformatcv/contact.rb', line 2

def title
  @title
end