mind_meld 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mind_meld.rb +11 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fe211ad4268bb53b8a771ed82114bc972271c98
4
- data.tar.gz: b7327391f6e01965d041c19640f4ff684c9170d5
3
+ metadata.gz: c9bc63695b2178c1fd998bcfaa0498db04a20824
4
+ data.tar.gz: 7adecbef5702c59f37aed4c3258ac65baf5fefe6
5
5
  SHA512:
6
- metadata.gz: 1eba3450bd2aa1df39a956750af398fd9f495390ec6599dbfa368935ea6f5c7e698368f475197601fbc3a879d3fa323dcc4274eebd29c1318047c08243be3735
7
- data.tar.gz: 77921f3f2c0613233de2e2c5b2e45d937bf1e5922e7fa1ae7981e37beb49e16453ec145983986fa647880b7f5e4a68e78dd01ab808e435d6efe85eb929a08b1d
6
+ metadata.gz: b56078873585b643c7827683fed77821a62c0d2365e0a4318e66355948e2ff175ebebdf8199221e9d7c78d36073c24659f4e4da9149f943dea900ec30d960d91
7
+ data.tar.gz: 50acdbb87be5d8342f845c5a5298c145015579fcbdf514bd826b3f1a94a438fb008e04d0a3c6d941d24a5c30fe3003c3650674c6d7f0ba435d27a4084ba6a503
data/lib/mind_meld.rb CHANGED
@@ -10,13 +10,17 @@ class MindMeld
10
10
 
11
11
  @device = options[:device]
12
12
 
13
- # To initialize @id (is this needed?)
14
- self.id
13
+ # To trigger registration (is this needed?)
14
+ device_details
15
15
  end
16
16
  end
17
17
 
18
18
  def id
19
- @id ||= register(@device)['id']
19
+ device_details['id']
20
+ end
21
+
22
+ def name
23
+ device_details['name']
20
24
  end
21
25
 
22
26
  def register options
@@ -44,4 +48,8 @@ puts args
44
48
  { error: 'Mind Meld not configured' }
45
49
  end
46
50
  end
51
+
52
+ def device_details
53
+ device_details ||= register(@device)
54
+ end
47
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mind_meld
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Haig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-16 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport