Sha256: ce2d4ba3e913bf801224c105fc68d86b6db1fd1264fd088f158da886fd55c35d

Contents?: true

Size: 430 Bytes

Versions: 27

Compression:

Stored size: 430 Bytes

Contents

class Agilibox::SMS::Message
  attr_reader :data

  def initialize(data)
    @data = data
  end

  def strategy=(value)
    @strategy = Agilibox::SMS.parse_strategy(value)
  end

  def strategy(value = :no_argument)
    self.strategy = value unless value == :no_argument
    @strategy || Agilibox::SMS.strategy
  end

  def deliver_now
    strategy.call(data)
  end

  # TODO : Delay
  def deliver_later
    deliver_now
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
agilibox-2.0.0 app/sms/agilibox/sms/message.rb
agilibox-1.11.0 app/sms/agilibox/sms/message.rb
agilibox-1.10.5 app/sms/agilibox/sms/message.rb
agilibox-1.10.2 app/sms/agilibox/sms/message.rb
agilibox-1.10.1 app/sms/agilibox/sms/message.rb
agilibox-1.10.0 app/sms/agilibox/sms/message.rb
agilibox-1.9.20 app/sms/agilibox/sms/message.rb
agilibox-1.9.19 app/sms/agilibox/sms/message.rb
agilibox-1.9.18 app/sms/agilibox/sms/message.rb
agilibox-1.9.17 app/sms/agilibox/sms/message.rb
agilibox-1.9.16 app/sms/agilibox/sms/message.rb
agilibox-1.9.15 app/sms/agilibox/sms/message.rb
agilibox-1.9.14 app/sms/agilibox/sms/message.rb
agilibox-1.9.13 app/sms/agilibox/sms/message.rb
agilibox-1.9.12 app/sms/agilibox/sms/message.rb
agilibox-1.9.11 app/sms/agilibox/sms/message.rb
agilibox-1.9.10 app/sms/agilibox/sms/message.rb
agilibox-1.9.9 app/sms/agilibox/sms/message.rb
agilibox-1.9.8 app/sms/agilibox/sms/message.rb
agilibox-1.9.7 app/sms/agilibox/sms/message.rb