Class: Twitter::DirectMessage

Inherits:
Base
  • Object
show all
Includes:
Creatable
Defined in:
lib/twitter/direct_message.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods included from Creatable

#created_at

Methods inherited from Base

#[], #initialize, lazy_attr_reader

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

  • other (Twiter::DirectMessage)

Returns:

  • (Boolean)


12
13
14
# File 'lib/twitter/direct_message.rb', line 12

def ==(other)
  super || (other.class == self.class && other.id == self.id)
end

#recipientTwitter::User

Returns:



17
18
19
# File 'lib/twitter/direct_message.rb', line 17

def recipient
  @recipient ||= Twitter::User.new(@attrs['recipient']) unless @attrs['recipient'].nil?
end

#senderTwitter::User

Returns:



22
23
24
# File 'lib/twitter/direct_message.rb', line 22

def sender
  @sender ||= Twitter::User.new(@attrs['sender']) unless @attrs['sender'].nil?
end