Class: Facebooker::Feed::Story

Inherits:
ActionBase show all
Defined in:
lib/facebooker/feed.rb

Overview

Representation of a story to be published into a user’s news feed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ActionBase

#add_image

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



60
61
62
# File 'lib/facebooker/feed.rb', line 60

def body
  @body
end

#titleObject

Returns the value of attribute title.



60
61
62
# File 'lib/facebooker/feed.rb', line 60

def title
  @title
end

Instance Method Details

#to_paramsObject

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