prolenea 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cc07c6e3b39b05787a0ce2d617f80e4eae5532e
4
- data.tar.gz: 9cde2e0664a9f8e7b6435ad7985e66fb51feb92a
3
+ metadata.gz: 95a5ccfa9fd8843a96b12815ab8e4227032c884b
4
+ data.tar.gz: 2d754f25c907f38dbdacca632f8b196c5d0501c7
5
5
  SHA512:
6
- metadata.gz: e9766eee47b6c95380f70de16ff1165159ba38850cf031e6afbbc5fd66bc29b84b47b0480989b8030f021b3b711558bfb4b47813cd9964cb105f6a9302187ab6
7
- data.tar.gz: 6f904609ee4ccbd6b60e1ca7759a84cc2f033199a28c1a77101b697f3842df8c1a2d318d2bf89ec26bc63703b577dc464f7dd85c6c558ff79d6a00c390947f93
6
+ metadata.gz: 6a3eb4905723345cf891ed35ddb68f8c52c0775ebd9163b99aefd5830586266fe53e58c9c73719b97582f646368cad430f587e2b0ca6c52b801a0bcb3755b24f
7
+ data.tar.gz: 2278c45e89e1aa2d24982f5411f2fbb283f583a48ba20a59d635601e236f9954ac1419e97585fa63befc8288f70debeafa933fa7c9086269c0428c2443fa2c5f
@@ -11,13 +11,17 @@ module Prolenea
11
11
  module ClassMethods
12
12
 
13
13
  def connection
14
- @connection ? @connection : (raise StandardError)
14
+ @connection ? @connection : (raise ProleneaNoConnectionError)
15
15
  end
16
16
 
17
17
  def connect(config = {})
18
18
  @connection = Connection.new(:uri => config[:uri])
19
19
  end
20
20
 
21
+ def connected?
22
+ !@connection.nil?
23
+ end
24
+
21
25
  def lookup_number(number)
22
26
  params = {:dial => number}
23
27
 
@@ -14,5 +14,8 @@ module Prolenea
14
14
 
15
15
  class ProleneaLookupError < ProleneaError #:nodoc:
16
16
  end
17
+
18
+ class ProleneaNoConnectionError < ProleneaError #:nodoc:
19
+ end
17
20
  end
18
21
  end
@@ -1,3 +1,3 @@
1
1
  module Prolenea
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prolenea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Larrimore