struct

Exu::Domain::EmailAddress

Inherits Struct < Value < Object

Value object representing a valid virtual mailbox email address. Strictly rejects path traversal characters, double dots, and invalid local parts.

Constants

LOCAL_PART_REGEX = /^[a-zA-Z0-9._%+-]+$/

Constructors

new(raw : String)
Source

Class methods

valid?(raw : String) : Bool

Validates email address format and path-safety of local-part

Source

Instance methods

==(other : EmailAddress) : Bool
Source
==(other : String) : Bool
Source
domain
Source
hash(hasher)

See Object#hash(hasher)

Source
local_part
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source