Sha256: 04bc1ab9ad71fb6f2d7ced55b8635195cf0bf0e32c3a289610ccb57f2be0f098

Contents?: true

Size: 598 Bytes

Versions: 7

Compression:

Stored size: 598 Bytes

Contents

class MessageSender
  attr_accessor :sender_name, :facebook_connection

  def initialize(sender_name, facebook_connection)
    @sender_name = sender_name
    @facebook_connection = facebook_connection
  end

  def send_unread_messages
    messages = facebook_connection.message_handler.unread
    send_array_of_messages(messages)
  end

  def send_messages
    messages = facebook_connection.message_handler.messages
    send_array_of_messages(messages)
  end

  private

  def send_array_of_messages(messages)
    sender = Senders.by_name(sender_name)
    sender.send_messages(messages)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fuck_facebook-0.5.4 src/message_sender.rb
fuck_facebook-0.5.3 src/message_sender.rb
fuck_facebook-0.5.2 src/message_sender.rb
fuck_facebook-0.5.1 src/message_sender.rb
fuck_facebook-0.5.0 src/message_sender.rb
fuck_facebook-0.4.1 src/message_sender.rb
fuck_facebook-0.4.0 src/message_sender.rb