Class: FacebookWall::Post

Inherits:
Object
  • Object
show all
Defined in:
lib/facebook_wall/post.rb

Overview

A Facebook wall post.

FacebookWall::Post decorates RSS::Rss::Channel::Item, which means you can easily access all sub-elements of items published in a page’s feed. For example:

post.title        # => A title automatically generated by Facebook
post.link         # => The URL of the wall post
post.description  # => The content of the wall post
post.pubDate      # => The date the post was published
post.author       # => The author of the post

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feed_entry) ⇒ Post

Returns a new instance of Post.



15
16
17
# File 'lib/facebook_wall/post.rb', line 15

def initialize(feed_entry)
  @feed_entry = feed_entry
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id) ⇒ Object

:nodoc:



19
20
21
# File 'lib/facebook_wall/post.rb', line 19

def method_missing(method_id)  #:nodoc:
  feed_entry.send method_id.id2name
end

Instance Attribute Details

#feed_entryObject (readonly)

Returns the value of attribute feed_entry.



13
14
15
# File 'lib/facebook_wall/post.rb', line 13

def feed_entry
  @feed_entry
end