Class: Discuss::MessageSender

Inherits:
Object
  • Object
show all
Defined in:
app/services/discuss/message_sender.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ MessageSender

Returns a new instance of MessageSender.



7
8
9
10
# File 'app/services/discuss/message_sender.rb', line 7

def initialize message
  @message = message
  @recipients = message.recipient_list
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



2
3
4
# File 'app/services/discuss/message_sender.rb', line 2

def message
  @message
end

#recipientsObject (readonly)

Returns the value of attribute recipients.



2
3
4
# File 'app/services/discuss/message_sender.rb', line 2

def recipients
  @recipients
end

Instance Method Details

#runObject



12
13
14
# File 'app/services/discuss/message_sender.rb', line 12

def run
  deliver!
end