Module: FormattedPhoneNumber::InstanceMethods
- Defined in:
- lib/formatted_phone_number/formatted_phone_number.rb
Instance Method Summary collapse
Instance Method Details
#phone_area_code ⇒ Object
24 25 26 |
# File 'lib/formatted_phone_number/formatted_phone_number.rb', line 24 def phone_area_code self.send(self.class.phone_column).split('-')[0] if self.send(self.class.phone_column) end |
#phone_prefix ⇒ Object
28 29 30 |
# File 'lib/formatted_phone_number/formatted_phone_number.rb', line 28 def phone_prefix self.send(self.class.phone_column).split('-')[1] if self.send(self.class.phone_column) end |
#phone_suffix ⇒ Object
32 33 34 |
# File 'lib/formatted_phone_number/formatted_phone_number.rb', line 32 def phone_suffix self.send(self.class.phone_column).split('-')[2] if self.send(self.class.phone_column) end |