Class: Facebooker::Feed::Story
- Inherits:
-
ActionBase
- Object
- ActionBase
- Facebooker::Feed::Story
- Defined in:
- lib/facebooker/feed.rb
Overview
Representation of a story to be published into a user’s news feed.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#to_params ⇒ Object
Converts Story to a Hash of its attributes for use as parameters to Facebook REST API calls.
Methods inherited from ActionBase
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
60 61 62 |
# File 'lib/facebooker/feed.rb', line 60 def body @body end |
#title ⇒ Object
Returns the value of attribute title.
60 61 62 |
# File 'lib/facebooker/feed.rb', line 60 def title @title end |
Instance Method Details
#to_params ⇒ Object
Converts Story to a Hash of its attributes for use as parameters to Facebook REST API calls
64 65 66 67 |
# File 'lib/facebooker/feed.rb', line 64 def to_params raise "Must set title before converting" if self.title.nil? { :title => title, :body => body }.merge image_params end |