Class: Phone

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/phone.rb

Class Method Summary collapse

Class Method Details

.from_athena(unparsed_phone) ⇒ Object

This method is here solely to parse phones in the Athena migration There were in the form type:number



7
8
9
10
11
# File 'app/models/phone.rb', line 7

def self.from_athena(unparsed_phone)
  Phone.new.tap do |phone|
    phone.kind, phone.number = unparsed_phone.split(":")
  end
end

.kindsObject



13
14
15
# File 'app/models/phone.rb', line 13

def self.kinds
  [ "Work", "Home", "Cell", "Fax", "Other" ]
end