Class: MyRepresentatives::Person
- Inherits:
-
Object
- Object
- MyRepresentatives::Person
- Includes:
- Hashable
- Defined in:
- lib/my_representatives/person.rb
Defined Under Namespace
Classes: Error, IsNotAnElectorateObjectError
Instance Attribute Summary collapse
-
#electorate ⇒ Object
Returns the value of attribute electorate.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#formal_name ⇒ Object
Returns the value of attribute formal_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#homepage_url ⇒ Object
Returns the value of attribute homepage_url.
-
#honorifics ⇒ Object
Returns the value of attribute honorifics.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#party_name ⇒ Object
Returns the value of attribute party_name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#physical_address ⇒ Object
Returns the value of attribute physical_address.
-
#postal_address ⇒ Object
Returns the value of attribute postal_address.
-
#preferred_name ⇒ Object
Returns the value of attribute preferred_name.
-
#salutation ⇒ Object
Returns the value of attribute salutation.
-
#successful_merge ⇒ Object
Returns the value of attribute successful_merge.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(electorate) ⇒ Person
constructor
A new instance of Person.
- #to_hash ⇒ Object
Constructor Details
#initialize(electorate) ⇒ Person
Returns a new instance of Person.
14 15 16 17 18 |
# File 'lib/my_representatives/person.rb', line 14 def initialize(electorate) raise IsNotAnElectorateObjectError unless electorate && electorate.is_a?(Electorate) @electorate = electorate @successful_merge = false end |
Instance Attribute Details
#electorate ⇒ Object
Returns the value of attribute electorate.
11 12 13 |
# File 'lib/my_representatives/person.rb', line 11 def electorate @electorate end |
#email ⇒ Object
Returns the value of attribute email.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def first_name @first_name end |
#formal_name ⇒ Object
Returns the value of attribute formal_name.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def formal_name @formal_name end |
#gender ⇒ Object
Returns the value of attribute gender.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def gender @gender end |
#homepage_url ⇒ Object
Returns the value of attribute homepage_url.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def homepage_url @homepage_url end |
#honorifics ⇒ Object
Returns the value of attribute honorifics.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def honorifics @honorifics end |
#image_url ⇒ Object
Returns the value of attribute image_url.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def image_url @image_url end |
#last_name ⇒ Object
Returns the value of attribute last_name.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def last_name @last_name end |
#party_name ⇒ Object
Returns the value of attribute party_name.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def party_name @party_name end |
#phone ⇒ Object
Returns the value of attribute phone.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def phone @phone end |
#physical_address ⇒ Object
Returns the value of attribute physical_address.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def physical_address @physical_address end |
#postal_address ⇒ Object
Returns the value of attribute postal_address.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def postal_address @postal_address end |
#preferred_name ⇒ Object
Returns the value of attribute preferred_name.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def preferred_name @preferred_name end |
#salutation ⇒ Object
Returns the value of attribute salutation.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def salutation @salutation end |
#successful_merge ⇒ Object
Returns the value of attribute successful_merge.
11 12 13 |
# File 'lib/my_representatives/person.rb', line 11 def successful_merge @successful_merge end |
#title ⇒ Object
Returns the value of attribute title.
12 13 14 |
# File 'lib/my_representatives/person.rb', line 12 def title @title end |
Instance Method Details
#to_hash ⇒ Object
20 21 22 |
# File 'lib/my_representatives/person.rb', line 20 def to_hash super end |