Class: Stockade::Lexemes::Phone
- Defined in:
- lib/stockade/lexemes/phone.rb
Overview
Phone lexeme
Constant Summary collapse
- MASKS =
File.readlines('data/phones.txt').freeze
Instance Attribute Summary
Attributes inherited from Base
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
.regex ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/stockade/lexemes/phone.rb', line 10 def regex / #{MASKS .map { |mask| to_re(mask) } .join(" |\n") } /x end |