dohutil 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/doh/to_display.rb +3 -3
  2. metadata +2 -2
@@ -45,7 +45,7 @@ end
45
45
  module Doh
46
46
 
47
47
  def self.display_phone(str, html_format = false)
48
- return str unless str.size == 10
48
+ return str unless str.to_s.size == 10
49
49
  formatted = "#{str[0..2]}-#{str[3..5]}-#{str[6..9]}"
50
50
  if html_format
51
51
  "<a href='callto:+1#{formatted}'>#{formatted}</a>"
@@ -55,12 +55,12 @@ def self.display_phone(str, html_format = false)
55
55
  end
56
56
 
57
57
  def self.display_postal(str)
58
- return str unless str.size == 9
58
+ return str unless str.to_s.size == 9
59
59
  return str[0..4] + '-' + str[5..8]
60
60
  end
61
61
 
62
62
  def self.display_ssn(str)
63
- return str unless str.size == 9
63
+ return str unless str.to_s.size == 9
64
64
  str[0..2] + '-' + str[3..4] + '-' + str[5..8]
65
65
  end
66
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-07-27 00:00:00.000000000 Z
13
+ date: 2012-08-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dohroot