Method: Facebooker::Rails::Publisher#send_as

Defined in:
lib/facebooker/rails/publisher.rb

#send_as(option) ⇒ Object



294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/facebooker/rails/publisher.rb', line 294

def send_as(option)
  self._body=case option
  when :action
    Facebooker::Feed::Action.new
  when :story
    Facebooker::Feed::Story.new
  when :templatized_action
    Facebooker::Feed::TemplatizedAction.new
  when :notification
    Notification.new
  when :email
    Email.new
  when :profile
    Profile.new
  when :ref
    Ref.new
  when :user_action
    UserAction.new
  when :publish_stream
    PublishStream.new
  else
    raise UnknownBodyType.new("Unknown type to publish")
  end
end