Sha256: 0d689e68aeeecd413d3dbec24f3a08297d8ac87d8549bba24f49ef79317f5291
Contents?: true
Size: 264 Bytes
Versions: 4
Compression:
Stored size: 264 Bytes
Contents
module Iz class Email REGEX = /.+@.+/ attr_accessor :value def initialize(email) self.value = email end def valid? !!Iz::Email.is_email?(value) end def self.is_email?(value) value.to_s =~ REGEX end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
iz-0.3.1 | lib/iz/email.rb |
iz-0.3.0 | lib/iz/email.rb |
iz-0.2.1 | lib/iz/email.rb |
iz-0.2.0 | lib/iz/email.rb |