Class: Facebooker::MessageThread::Message::Attachment
- Inherits:
-
Object
- Object
- Facebooker::MessageThread::Message::Attachment
- Includes:
- Facebooker::Model
- Defined in:
- lib/facebooker/models/message_thread.rb
Overview
An attachment can be a photo, a video, or a link
Instance Attribute Summary collapse
-
#caption ⇒ Object
Returns the value of attribute caption.
-
#description ⇒ Object
Returns the value of attribute description.
-
#href ⇒ Object
Returns the value of attribute href.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#link? ⇒ Boolean
The Facebook messages API is in beta, this helper method is supposed to fail anytime soon.
-
#photo? ⇒ Boolean
The Facebook messages API is in beta, this helper method is supposed to fail anytime soon.
-
#video? ⇒ Boolean
The Facebook messages API is in beta, this helper method is supposed to fail anytime soon.
Methods included from Facebooker::Model
#anon=, included, #initialize, #populate, #populate_from_hash!, #populated?, #session
Instance Attribute Details
#caption ⇒ Object
Returns the value of attribute caption.
20 21 22 |
# File 'lib/facebooker/models/message_thread.rb', line 20 def @caption end |
#description ⇒ Object
Returns the value of attribute description.
20 21 22 |
# File 'lib/facebooker/models/message_thread.rb', line 20 def description @description end |
#href ⇒ Object
Returns the value of attribute href.
20 21 22 |
# File 'lib/facebooker/models/message_thread.rb', line 20 def href @href end |
#icon ⇒ Object
Returns the value of attribute icon.
20 21 22 |
# File 'lib/facebooker/models/message_thread.rb', line 20 def icon @icon end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/facebooker/models/message_thread.rb', line 20 def name @name end |
Instance Method Details
#link? ⇒ Boolean
The Facebook messages API is in beta, this helper method is supposed to fail anytime soon
33 34 35 |
# File 'lib/facebooker/models/message_thread.rb', line 33 def link? !video? && !photo? end |
#photo? ⇒ Boolean
The Facebook messages API is in beta, this helper method is supposed to fail anytime soon
28 29 30 |
# File 'lib/facebooker/models/message_thread.rb', line 28 def photo? self.href =~ /\Ahttp:\/\/www\.facebook\.com\/photo\.php.*/ end |
#video? ⇒ Boolean
The Facebook messages API is in beta, this helper method is supposed to fail anytime soon
23 24 25 |
# File 'lib/facebooker/models/message_thread.rb', line 23 def video? self.href =~ /\Ahttp:\/\/www\.facebook\.com\/video\/video\.php.*/ end |