Sha256: d3c47988960a4f5e572352653576879b75655042e62ce40aa8a5ff75f499f0d2
Contents?: true
Size: 1.96 KB
Versions: 2
Compression:
Stored size: 1.96 KB
Contents
h1. PeoplePlacesThings PeoplePlacesThings is a collection of ruby classes for parsing and formatting U.S person names, street addresses, phone numbers, and more. h2. Using PeoplePlacesThings <pre><code> require 'people_places_things' include PeoplePlacesThings name = PersonName.new("george quincy harold peabody jr.") name.first => "george" name.first_i => "g" name.last => "peabody" name.middle => "quincy harold" name.suffix => "jr." name.to_s(:last_comma_first) => "peabody,george" name.to_s(:full) => "george quincy peabody jr." name2 = PersonName.new("peabody jr., george quincy harold", :last_first_middle) name.eql?(name2) => true addr = StreetAddress.new("204-b ne. 1st ave suite 4") addr.number => "204-b" addr.pre_direction => :northeast addr.name => "1st" addr.suffix => :avenue addr.unit_type => :suite addr.unit => "4" addr.to_s => "204-b northeast 1st avenue suite 4" ANSICounties.code_for('GA', 'FULTON') => 13121 ANSICounties.code_for(:state => 'ga', :county => 'fulton') => 13121 ANSICounties.data_for(13121) => { :state => 'GA', :county => 'FULTON' } phone = PhoneNumber.new '14045551212' phone.country_code => 1 phone.area_code => '404' phone.number => '5551212' phone.exchange => '555' phone.suffix => '1212' phone.to_s => '1 (404) 555-1212' zip = ZipCode.new '30306-3522' zip.base => '30306' zip.plus_four => '3522' zip.to_s => '30306-3522' state = State.new 'california' state.sym => :ca state.to_s => 'California' state.to_s(:abbr) => 'CA' location = Location.new 'san francisco, ca 94114-1222' location.city => 'san francisco' location.state.to_s => 'California' location.zip.base => '94114' </code></pre> h2. Data source The data that makes up @lib/people_places_things/ansi_counties/data/data.yml@ was generated from @lib/people_places_things/ansi_counties/data/raw.txt@, which was downloaded from "the US Census website":http://www.census.gov/geo/www/ansi/download.html.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dburkes-people_places_things-2.2.0 | README.textile |
dburkes-people_places_things-2.3.0 | README.textile |