Sha256: 73909d50ef9ef408e79233d3b76f484720fb66ca6cd910796a4871887138e16e

Contents?: true

Size: 467 Bytes

Versions: 5

Compression:

Stored size: 467 Bytes

Contents

#Copyright (c) 2008-9 Peter H. Boling of 9thBit LLC
#Released under the MIT license

module NinthBit
  module CustomEnvironments
    
    def self.included(base)
      base.extend(ClassMethods)
  
      base.cattr_accessor :local_environments
      base.local_environments = %w( development test )
    end

    module ClassMethods
      def consider_local?
        local_environments.include?(defined?(Rails) ? Rails.env : RAILS_ENV)
      end
    end
    
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
pboling-sanitize_email-1.0.0 lib/sanitize_email/custom_environments.rb
sanitize_email-0.3.7 lib/sanitize_email/custom_environments.rb
futurechimp-sanitize_email-0.3.6 lib/sanitize_email/custom_environments.rb
sanitize_email-0.3.6 lib/sanitize_email/custom_environments.rb
sanitize_email-0.3.5 lib/sanitize_email/custom_environments.rb