Class: Clever::Models::Contact
- Inherits:
-
Object
- Object
- Clever::Models::Contact
- Defined in:
- lib/clever/models/contact.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#phone_type ⇒ Object
Returns the value of attribute phone_type.
-
#student_id ⇒ Object
Returns the value of attribute student_id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params) ⇒ Contact
constructor
A new instance of Contact.
Constructor Details
#initialize(params) ⇒ Contact
Returns a new instance of Contact.
4 5 6 |
# File 'lib/clever/models/contact.rb', line 4 def initialize params params.each { |k,v| instance_variable_set("@#{k}", v) unless v.nil? } end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def phone @phone end |
#phone_type ⇒ Object
Returns the value of attribute phone_type.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def phone_type @phone_type end |
#student_id ⇒ Object
Returns the value of attribute student_id.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def student_id @student_id end |
#type ⇒ Object
Returns the value of attribute type.
2 3 4 |
# File 'lib/clever/models/contact.rb', line 2 def type @type end |