Sha256: 893056922513d0b4fe556cfa438528efab361023f4ffab72f00b014f691a7628
Contents?: true
Size: 425 Bytes
Versions: 24
Compression:
Stored size: 425 Bytes
Contents
module Compony module ModelFields # Requires 'phonelib' gem class Phone < Base def initialize(...) fail('Please include gem "phonelib" to use the :phone field type.') unless defined?(Phonelib) super end def value_for(data, controller: nil, **_) return transform_and_join(data.send(@name), controller:) { |el| Phonelib.parse(el).international } end end end end
Version data entries
24 entries across 24 versions & 1 rubygems