Class: Stockade::Lexemes::Email

Inherits:
Base
  • Object
show all
Defined in:
lib/stockade/lexemes/email.rb

Overview

Email lexeme

Instance Attribute Summary

Attributes inherited from Base

#raw_value, #start_pos

Class Method Summary collapse

Methods inherited from Base

#==, #end_pos, #initialize, #mask, #range, #token, #type, types, #valid?, #value

Constructor Details

This class inherits a constructor from Stockade::Lexemes::Base

Class Method Details

.regexObject



7
8
9
10
11
12
13
14
15
# File 'lib/stockade/lexemes/email.rb', line 7

def self.regex
  /
  [\w+\-\.\+]+
  @
  [a-z\d\-]+
  (\.[a-z]+)*
  \.[a-z]+ # TLD
  /x
end