Sha256: 964dd050c1fb881dbfe564f4ba1aa5845dd3a56497af6cb2d1cd19660f0a208d

Contents?: true

Size: 544 Bytes

Versions: 2

Compression:

Stored size: 544 Bytes

Contents

module SecretSantaPicker
  module ConfigDefault
    DefaultCSVFilePath = "secret_santa.csv"
  end

  class Configuration
    include ConfigDefault

    attr_accessor :csv_file_path, :sender_email, :sender_password, :debug, :subject_prefix

    def initialize(&block)
      @csv_file_path = DefaultCSVFilePath
      @sender_email = ENV['SENDER_EMAIL']
      @sender_password = ENV['SENDER_PASSWORD']
      @debug = false
      @subject_prefix = nil

      configure(&block) if block
    end

    def configure
      yield self
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
secret_santa_picker-0.2.1 lib/secret_santa_picker/configuration.rb
secret_santa_picker-0.2.0 lib/secret_santa_picker/configuration.rb