module Sidekiq::Mailer
Constants
- VERSION
Public Class Methods
current_env()
click to toggle source
# File lib/sidekiq_mailer.rb, line 17 def self.current_env if defined?(Rails) ::Rails.env else ENV['RAILS_ENV'].to_s end end
excluded_environments()
click to toggle source
# File lib/sidekiq_mailer.rb, line 13 def self.excluded_environments @@excluded_environments ||= [] end
excluded_environments=(envs)
click to toggle source
# File lib/sidekiq_mailer.rb, line 9 def self.excluded_environments=(envs) @@excluded_environments = [*envs].map { |e| e && e.to_sym } end
excludes_current_environment?()
click to toggle source
# File lib/sidekiq_mailer.rb, line 25 def self.excludes_current_environment? !ActionMailer::Base.perform_deliveries || (excluded_environments && excluded_environments.include?(current_env.to_sym)) end
included(base)
click to toggle source
# File lib/sidekiq_mailer.rb, line 29 def self.included(base) base.extend(ClassMethods) base.class_attribute :sidekiq_options_hash end