Sha256: 870e33ed45246bcfa86d9a08a8c08c0ff2641cec39067a075288e8dcc6fbf8fd
Contents?: true
Size: 592 Bytes
Versions: 2
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true module EmailInquire class Response attr_accessor :email, :replacement, :status def hint!(domain: nil) self.status = :hint old_name, _old_domain = email.split("@") self.replacement = "#{old_name}@#{domain}" if domain end def hint? status == :hint end def invalid! self.status = :invalid end def invalid? status == :invalid end def status? !status.nil? end def valid! self.status = :valid end def valid? status == :valid end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
email_inquire-0.6.0 | lib/email_inquire/response.rb |
email_inquire-0.5.0 | lib/email_inquire/response.rb |