artoo 1.4.0 → 1.4.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57e4bd711ba505875140f81f9b2d469bad032770
|
4
|
+
data.tar.gz: 45850c141125fe86cb4ac9eb5a6af5b958748e89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 696898f26fb1138d0cfbdef2e9975003c19024cc812b7e35e1cb2561f1abc8f1dd5515f56ad3917ce3ba3cbe46477971cb6b31e91b3af9ac0092ea8decf45f18
|
7
|
+
data.tar.gz: 666ee74c17749ba33b3a124703cbbc459954b28c8a7608b9bc826b972a74c723cda49343e2837fe1a8f56b8bdaddedfdfc8f7001f4b9a2e2640e03c0f9632866
|
data/Gemfile.lock
CHANGED
@@ -8,7 +8,8 @@ module Artoo
|
|
8
8
|
# @see https://github.com/celluloid/celluloid-io Celluloid::IO Documentation
|
9
9
|
class Adaptor
|
10
10
|
include Celluloid::IO
|
11
|
-
|
11
|
+
finalizer :finalize
|
12
|
+
|
12
13
|
attr_reader :parent, :port, :additional_params
|
13
14
|
|
14
15
|
# Initialize an adaptor
|
@@ -23,6 +24,12 @@ module Artoo
|
|
23
24
|
@connected = false
|
24
25
|
end
|
25
26
|
|
27
|
+
# Closes connection with device if connected
|
28
|
+
# @return [Boolean]
|
29
|
+
def finalize
|
30
|
+
disconnect if connected?
|
31
|
+
end
|
32
|
+
|
26
33
|
# Makes connected flag true
|
27
34
|
# @return [Boolean]
|
28
35
|
def connect
|
@@ -5,15 +5,8 @@ module Artoo
|
|
5
5
|
# Connect to a <%= adaptor_name %> device
|
6
6
|
# @see device documentation for more information
|
7
7
|
class <%= adaptor_class_name %> < Adaptor
|
8
|
-
finalizer :finalize
|
9
8
|
attr_reader :device
|
10
9
|
|
11
|
-
# Closes connection with device if connected
|
12
|
-
# @return [Boolean]
|
13
|
-
def finalize
|
14
|
-
disconnect if connected?
|
15
|
-
end
|
16
|
-
|
17
10
|
# Creates a connection with device
|
18
11
|
# @return [Boolean]
|
19
12
|
def connect
|
data/lib/artoo/version.rb
CHANGED