Class: Croudia::SecretMail
- Includes:
- Creatable
- Defined in:
- lib/croudia/secret_mail.rb
Constant Summary collapse
- KEYS =
[ :id_str, :recipient, :recipient_id, :recipient_screen_name, :sender, :sender_id, :sender_screen_name, :text, ]
Instance Method Summary collapse
-
#initialize(attrs) ⇒ SecretMail
constructor
A new instance of SecretMail.
Methods included from Creatable
Methods inherited from Identity
Methods inherited from Base
Constructor Details
#initialize(attrs) ⇒ SecretMail
Returns a new instance of SecretMail.
21 22 23 24 25 26 27 |
# File 'lib/croudia/secret_mail.rb', line 21 def initialize(attrs) recipient = attrs.delete('recipient') sender = attrs.delete('sender') super(attrs) @attrs['recipient'] = Croudia::User.new(recipient) if recipient @attrs['sender'] = Croudia::User.new(sender) if sender end |