Class: Truemail::Validate::Smtp::Request::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/truemail/validate/smtp/request.rb

Constant Summary collapse

REQUEST_PARAMS =
%i[connection_timeout response_timeout verifier_domain verifier_email].freeze

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Configuration

Returns a new instance of Configuration.


48
49
50
51
52
53
# File 'lib/truemail/validate/smtp/request.rb', line 48

def initialize(configuration)
  REQUEST_PARAMS.each do |attribute|
    self.class.class_eval { attr_reader attribute }
    instance_variable_set(:"@#{attribute}", configuration.public_send(attribute))
  end
end