Sha256: b72cab825360d539f18c552acfdfc1c78f53cce9812545c4fc034f4e79990ef2
Contents?: true
Size: 468 Bytes
Versions: 15
Compression:
Stored size: 468 Bytes
Contents
require 'enumeration' module Osheet::Format class Special include Enumeration enum(:type, { :zip_code => '00000', :zip_code_plus_4 => '00000-0000', :phone_number => '[<=9999999]###-####;(###) ###-####', :social_security_number => '000-00-0000' }) def initialize(opts={}) self.type = opts[:type] end def style type end def key "special_#{type_key.to_s.gsub('_', '')}" end end end
Version data entries
15 entries across 15 versions & 1 rubygems