alexander_graham_bell 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 926ea95a3d2aa6a163c4729f2ef82e2241418f51
4
- data.tar.gz: 0afff154f9914785920404eb76b68bcefa1babc3
3
+ metadata.gz: 68a381ae7b9f471a805d9fb9af0a225cb4a464a9
4
+ data.tar.gz: 2c490a2fb48e0052039aa177763d9c63fb943569
5
5
  SHA512:
6
- metadata.gz: 40a0a7deec8b03e8c8753f2f66fb459db27b13c4be6e10dd610fbbf9f39df68083f0e14fc01b79b689a1b3d2bf7993e628f8d64d4140a859b2b22e6d57aeea92
7
- data.tar.gz: 003fb7a06ee93637b00c932dd7c16d6a56a4b862b191a81eea472841a4729d20cafee4a9f5f22dbb664ca2f8a332e58f850631b4be705f0204028a19c9d100d2
6
+ metadata.gz: 627af571057b837854119ecec444c4356ef26dc0dc250463f1e780172faf283baa455427e0a058b5b4b178e48a578107603444a419b2be381a6752c0720e9a85
7
+ data.tar.gz: 4f762ef72da0457d7fcdb6c35c5549dc85049bc6cae1dd0e521d96fa24fcd8515d93256730f2fe06d3167c4b75e125bf5b2f6db9ea5afdc08321aab08a37fbde
@@ -4,11 +4,11 @@ require 'alexander_graham_bell/phone'
4
4
 
5
5
  module AlexanderGrahamBell
6
6
  class << self
7
- def tel_link(phone_number, escaper = ERB::Util.method(:h))
7
+ def tel_link(phone_number)
8
8
  phone = Phone.new(phone_number)
9
- escaped_phone_number = escape_phone_number(phone_number, escaper)
9
+ escaped_phone_number = escape_phone_number(phone_number)
10
10
  return escaped_phone_number unless phone.valid?
11
- "<a href=\"tel:#{phone.number}#{isub(phone)}\">#{escaped_phone_number}</a>"
11
+ "<a href=\"#{tel_href(phone_number)}\">#{escaped_phone_number}</a>"
12
12
  end
13
13
 
14
14
  def tel_href(phone_number)
@@ -20,8 +20,8 @@ module AlexanderGrahamBell
20
20
 
21
21
  private
22
22
 
23
- def escape_phone_number(phone_number, escaper = ERB::Util.method(:h))
24
- escaper ? escaper.call(phone_number) : phone_number
23
+ def escape_phone_number(phone_number)
24
+ ERB::Util.h(phone_number)
25
25
  end
26
26
 
27
27
  def isub(phone)
@@ -1,3 +1,3 @@
1
1
  module AlexanderGrahamBell
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexander_graham_bell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Speidel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-03-11 00:00:00.000000000 Z
12
+ date: 2016-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler