Class: Imessage::Sender
- Inherits:
-
Object
- Object
- Imessage::Sender
- Defined in:
- lib/imessage/sender.rb
Instance Method Summary collapse
Instance Method Details
#deliver(options = { text: nil, attachment: nil, contacts: [] }) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/imessage/sender.rb', line 5 def deliver( = { text: nil, attachment: nil, contacts: [] }) raise 'You must specific at least a text or attachment.' if [:text].nil? && [:attachment].nil? raise 'You must specific at least one contact' if [:contacts].empty? [:contacts].each do |contact| _deliver([:text], [:attachment], contact) end end |