big-phoney 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{big-phoney}
5
- s.version = "0.0.9"
5
+ s.version = "0.1.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Pat Nakajima", "Brandon Keene"]
@@ -30,6 +30,10 @@ module BigPhoney
30
30
  976 977 979 991 992 993 994 995 996
31
31
  998
32
32
  ]
33
+ AREA_CODES = {
34
+ :canada => %w[204 250 289 306 403 416 418 450 506 514 519 604 613 647 705 709 778 780 807 819 867 902 905],
35
+ :puero_rico => %w[787 939]
36
+ }
33
37
 
34
38
  def self.assume_us? ; @assume_us end
35
39
  def self.assume_us=(us) ; @assume_us = us end
@@ -6,7 +6,7 @@ module BigPhoney
6
6
  define_method("#{field}=") do |value|
7
7
  return true if value.blank?
8
8
  just_digits = value.to_s.gsub(/[^\d]/, "")
9
- self[field] = (value.starts_with?("1") ? just_digits[1..-1] : just_digits)
9
+ self[field] = (just_digits.starts_with?("1") ? just_digits[1..-1] : just_digits)
10
10
  end
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big-phoney
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 9
10
- version: 0.0.9
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Nakajima