Class: Twitter::DirectMessage

Inherits:
Identity show all
Includes:
Creatable
Defined in:
lib/twitter/direct_message.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods included from Creatable

#created_at

Methods inherited from Identity

#==, fetch, #id, #initialize, store

Methods inherited from Base

#[], attr_reader, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update

Constructor Details

This class inherits a constructor from Twitter::Identity

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



8
9
10
# File 'lib/twitter/direct_message.rb', line 8

def text
  @text
end

Instance Method Details

#recipientTwitter::User

Returns:



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

def recipient
  @recipient ||= Twitter::User.fetch_or_new(@attrs[:recipient])
end

#senderTwitter::User

Returns:



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

def sender
  @sender ||= Twitter::User.fetch_or_new(@attrs[:sender])
end