Class: Registrar::Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Contact

Create a new contact optionally providing a Hash with name/value pairs representing one or more of the contact attributes.



22
23
24
25
26
27
28
29
# File 'lib/registrar/contact.rb', line 22

def initialize(attributes={})
  attributes.each do |k, v|
    m = "#{k}="
    if respond_to?(m)
      send(m, v)
    end
  end
end

Instance Attribute Details

#address_1Object

Returns the value of attribute address_1.



6
7
8
# File 'lib/registrar/contact.rb', line 6

def address_1
  @address_1
end

#address_2Object

Returns the value of attribute address_2.



7
8
9
# File 'lib/registrar/contact.rb', line 7

def address_2
  @address_2
end

#cityObject

Returns the value of attribute city.



8
9
10
# File 'lib/registrar/contact.rb', line 8

def city
  @city
end

#countryObject

Returns the value of attribute country.



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

def country
  @country
end

#emailObject

Returns the value of attribute email.



16
17
18
# File 'lib/registrar/contact.rb', line 16

def email
  @email
end

#faxObject

Returns the value of attribute fax.



15
16
17
# File 'lib/registrar/contact.rb', line 15

def fax
  @fax
end

#first_nameObject

Returns the value of attribute first_name.



4
5
6
# File 'lib/registrar/contact.rb', line 4

def first_name
  @first_name
end

#identifierObject

Returns the value of attribute identifier.



3
4
5
# File 'lib/registrar/contact.rb', line 3

def identifier
  @identifier
end

#job_titleObject

Returns the value of attribute job_title.



18
19
20
# File 'lib/registrar/contact.rb', line 18

def job_title
  @job_title
end

#last_nameObject

Returns the value of attribute last_name.



5
6
7
# File 'lib/registrar/contact.rb', line 5

def last_name
  @last_name
end

#organization_nameObject

Returns the value of attribute organization_name.



17
18
19
# File 'lib/registrar/contact.rb', line 17

def organization_name
  @organization_name
end

#phoneObject

Returns the value of attribute phone.



13
14
15
# File 'lib/registrar/contact.rb', line 13

def phone
  @phone
end

#phone_extObject

Returns the value of attribute phone_ext.



14
15
16
# File 'lib/registrar/contact.rb', line 14

def phone_ext
  @phone_ext
end

#postal_codeObject

Returns the value of attribute postal_code.



12
13
14
# File 'lib/registrar/contact.rb', line 12

def postal_code
  @postal_code
end

#state_provinceObject

Returns the value of attribute state_province.



9
10
11
# File 'lib/registrar/contact.rb', line 9

def state_province
  @state_province
end

#state_province_choiceObject

Returns the value of attribute state_province_choice.



10
11
12
# File 'lib/registrar/contact.rb', line 10

def state_province_choice
  @state_province_choice
end