class ParamsTransformer::ValueParser::Phone
Constants
- REGEX
Public Instance Methods
parse()
click to toggle source
# File lib/params_transformer/value_parser/phone.rb, line 6 def parse return nil unless input_value.present? return input_value if input_value.is_a?(Fixnum) input_value.scan(REGEX).join.try(:to_s) end