Class: Person
Instance Attribute Summary collapse
-
#admin ⇒ Object
Returns the value of attribute admin.
-
#attachable_sgid ⇒ Object
Returns the value of attribute attachable_sgid.
-
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
-
#bio ⇒ Object
Returns the value of attribute bio.
-
#company ⇒ Object
Returns the value of attribute company.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#personable_type ⇒ Object
Returns the value of attribute personable_type.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(json) ⇒ Person
constructor
A new instance of Person.
Constructor Details
#initialize(json) ⇒ Person
Returns a new instance of Person.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/messenger/models/person.rb', line 21 def initialize(json) @id = json['id'] @attachable_sgid = json['attachable_sgid'] @name = json['name'] @email_address = json['email_address'] @personable_type = json['personable_type'] @title = json['title'] @bio = json['bio'] @created_at = Time.parse(json['created_at']) @updated_at = Time.parse(json['updated_at']) @admin = json['admin'] @owner = json['owner'] @time_zone = json['time_zone'] @avatar_url = json['avatar_url'] @company = Company.new @company.id = json['company']['id'] @company.name = json['company']['name'] end |
Instance Attribute Details
#admin ⇒ Object
Returns the value of attribute admin.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def admin @admin end |
#attachable_sgid ⇒ Object
Returns the value of attribute attachable_sgid.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def attachable_sgid @attachable_sgid end |
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def avatar_url @avatar_url end |
#bio ⇒ Object
Returns the value of attribute bio.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def bio @bio end |
#company ⇒ Object
Returns the value of attribute company.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def company @company end |
#created_at ⇒ Object
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def created_at @created_at end |
#email_address ⇒ Object
Returns the value of attribute email_address.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def email_address @email_address end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def owner @owner end |
#personable_type ⇒ Object
Returns the value of attribute personable_type.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def personable_type @personable_type end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def time_zone @time_zone end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
7 8 9 |
# File 'lib/messenger/models/person.rb', line 7 def updated_at @updated_at end |