lib/imessage/sender.rb in imessage-0.0.1 vs lib/imessage/sender.rb in imessage-0.0.2

- old
+ new

@@ -1,10 +1,10 @@ module Imessage class Sender - def self.send(message:'', contacts: []) - contacts.each do |contact| + def self.send(options = {message:'', contacts: []}) + options[:contacts].each do |contact| apple_script_file = File.join(File.dirname(File.expand_path(__FILE__)), 'scripts/send_imessage.applescript') - `osascript #{apple_script_file} '#{contact}' '#{message}'` + `osascript #{apple_script_file} '#{contact}' '#{options[:message]}'` end end end end