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)
-
- (Object) body
Returns the value of attribute body.
-
- (Object) title
Returns the value of attribute title.
Instance Method Summary (collapse)
-
- (Object) to_params
Converts Story to a Hash of its attributes for use as parameters to Facebook REST API calls.
Methods inherited from ActionBase
Instance Attribute Details
- (Object) body
Returns the value of attribute body
60 61 62 |
# File 'lib/facebooker/feed.rb', line 60 def body @body end |
- (Object) title
Returns the value of attribute title
60 61 62 |
# File 'lib/facebooker/feed.rb', line 60 def title @title end |
Instance Method Details
- (Object) to_params
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 |