Class: Attribute::Telephone

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/attribute/telephone.rb

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object



5
6
7
# File 'lib/attribute/telephone.rb', line 5

def coerce(value)
  ::Telephone.new(value).stripped if value
end