lib/cellular/models/sms.rb in cellular-2.1.0 vs lib/cellular/models/sms.rb in cellular-2.2.0

- old
+ new

@@ -1,12 +1,13 @@ require 'active_support/time' module Cellular + # Represents an SMS class SMS - attr_accessor :recipient, :sender, :message, :price, :country_code attr_accessor :recipients, :delivery_status, :delivery_message + def initialize(options = {}) @backend = Cellular.config.backend @recipients = options[:recipients] @recipient = options[:recipient] @@ -22,19 +23,21 @@ @delivery_status, @delivery_message = @backend.deliver options @delivered = true end def deliver_async(delivery_options = {}) - Cellular::Jobs::AsyncMessenger.set(delivery_options).perform_later(options) + Cellular::Jobs::AsyncMessenger.set(delivery_options) + .perform_later(options) end + alias_method :deliver_later, :deliver_async - def save(options = {}) + def save(_options = {}) raise NotImplementedError end - def receive(options = {}) + def receive(_options = {}) raise NotImplementedError end def delivered? @delivered @@ -50,8 +53,7 @@ message: @message, price: @price, country_code: @country_code } end - end end