Sha256: edc452669991738b5d338dd15c0f42de2b80e00cc7efe23fc7ba8fa2e7beb116
Contents?: true
Size: 716 Bytes
Versions: 27
Compression:
Stored size: 716 Bytes
Contents
module Agilibox::SMS class << self def strategy=(value) @strategy = parse_strategy(value) end def strategy @strategy ||= default_strategy end attr_writer :default_from def default_from @default_from ||= Rails.application.class.to_s.chomp("::Application") end def parse_strategy(value) if value.is_a?(Symbol) "Agilibox::SMS::Strategies::#{value.to_s.camelcase}".constantize else value end 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
27 entries across 27 versions & 1 rubygems