Sha256: 76aed41f01fa6209deaab013a45ccbc3494fff948cf063ab36d1564d0e4b00d7

Contents?: true

Size: 493 Bytes

Versions: 44

Compression:

Stored size: 493 Bytes

Contents

module Agilibox::SMS
  class << self
    attr_writer :strategy

    def strategy
      @strategy ||= default_strategy
    end

    attr_writer :default_from

    def default_from
      @default_from ||= Rails.application.class.to_s.chomp("::Application")
    end

    private

    def default_strategy
      if Rails.env.development? || Rails.env.test?
        Agilibox::SMS::Strategies::Test
      else
        Agilibox::SMS::Strategies::AmazonSNS
      end
    end
  end # class << self
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
agilibox-1.7.4 app/sms/agilibox/sms.rb
agilibox-1.7.3 app/sms/agilibox/sms.rb
agilibox-1.7.2 app/sms/agilibox/sms.rb
agilibox-1.7.1 app/sms/agilibox/sms.rb
agilibox-1.7.0 app/sms/agilibox/sms.rb
agilibox-1.6.2 app/sms/agilibox/sms.rb
agilibox-1.6.1 app/sms/agilibox/sms.rb
agilibox-1.6.0 app/sms/agilibox/sms.rb
agilibox-1.5.13 app/sms/agilibox/sms.rb
agilibox-1.5.12 app/sms/agilibox/sms.rb
agilibox-1.5.11 app/sms/agilibox/sms.rb
agilibox-1.5.10 app/sms/agilibox/sms.rb
agilibox-1.5.9 app/sms/agilibox/sms.rb
agilibox-1.5.8 app/sms/agilibox/sms.rb
agilibox-1.5.7 app/sms/agilibox/sms.rb
agilibox-1.5.6 app/sms/agilibox/sms.rb
agilibox-1.5.5 app/sms/agilibox/sms.rb
agilibox-1.5.4 app/sms/agilibox/sms.rb
agilibox-1.5.3 app/sms/agilibox/sms.rb
agilibox-1.5.2 app/sms/agilibox/sms.rb