Class: Clever::Models::Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#emailObject

Returns the value of attribute email.



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

def email
  @email
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#phoneObject

Returns the value of attribute phone.



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

def phone
  @phone
end

#phone_typeObject

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_idObject

Returns the value of attribute student_id.



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

def student_id
  @student_id
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end