Class: SDM::ActivityActor
- Inherits:
-
Object
- Object
- SDM::ActivityActor
- Defined in:
- lib/models/porcelain.rb
Instance Attribute Summary collapse
-
#activity_external_id ⇒ Object
The external ID of the actor at the time this activity occurred.
-
#email ⇒ Object
The email of the actor at the time this activity occurred.
-
#first_name ⇒ Object
The first name of the actor at the time this activity occurred.
-
#id ⇒ Object
Unique identifier of the actor.
-
#last_name ⇒ Object
The last name of the actor at the time this activity occurred.
Instance Method Summary collapse
-
#initialize(activity_external_id: nil, email: nil, first_name: nil, id: nil, last_name: nil) ⇒ ActivityActor
constructor
A new instance of ActivityActor.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(activity_external_id: nil, email: nil, first_name: nil, id: nil, last_name: nil) ⇒ ActivityActor
Returns a new instance of ActivityActor.
1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 |
# File 'lib/models/porcelain.rb', line 1608 def initialize( activity_external_id: nil, email: nil, first_name: nil, id: nil, last_name: nil ) @activity_external_id = activity_external_id == nil ? "" : activity_external_id @email = email == nil ? "" : email @first_name = first_name == nil ? "" : first_name @id = id == nil ? "" : id @last_name = last_name == nil ? "" : last_name end |
Instance Attribute Details
#activity_external_id ⇒ Object
The external ID of the actor at the time this activity occurred.
1598 1599 1600 |
# File 'lib/models/porcelain.rb', line 1598 def activity_external_id @activity_external_id end |
#email ⇒ Object
The email of the actor at the time this activity occurred.
1600 1601 1602 |
# File 'lib/models/porcelain.rb', line 1600 def email @email end |
#first_name ⇒ Object
The first name of the actor at the time this activity occurred.
1602 1603 1604 |
# File 'lib/models/porcelain.rb', line 1602 def first_name @first_name end |
#id ⇒ Object
Unique identifier of the actor. Immutable.
1604 1605 1606 |
# File 'lib/models/porcelain.rb', line 1604 def id @id end |
#last_name ⇒ Object
The last name of the actor at the time this activity occurred.
1606 1607 1608 |
# File 'lib/models/porcelain.rb', line 1606 def last_name @last_name end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1622 1623 1624 1625 1626 1627 1628 |
# File 'lib/models/porcelain.rb', line 1622 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |