Sha256: 730d4f28d9b2b16cc4b9b0a3e323dcb4742dbbc5abc5fc5ceefe68842788d660

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 Bytes

Contents

# frozen_string_literal: true

module DefraRubyEmail
  class Configuration

    def initialize
      @enable = false
    end

    # Controls whether the mocks are enabled. Only if set to true will the mock
    # pages be accessible
    def enable=(arg)
      # We implement our own setter to handle values being passed in as strings
      # rather than booleans
      parsed = arg.to_s.downcase

      @enable = parsed == "true"
    end

    def enabled?
      @enable
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
defra_ruby_email-1.0.0 lib/defra_ruby_email/configuration.rb
defra_ruby_email-0.2.0 lib/defra_ruby_email/configuration.rb
defra_ruby_email-0.1.0 lib/defra_ruby_email/configuration.rb