helium-ruby 0.20.0 → 0.21.0
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 +4 -4
- data/README.md +47 -0
- data/docs/Helium.html +6 -6
- data/docs/Helium/Client.html +62 -34
- data/docs/Helium/Client/Configurations.html +296 -0
- data/docs/Helium/Client/DeviceConfigurations.html +465 -0
- data/docs/Helium/Client/Elements.html +92 -18
- data/docs/Helium/Client/Http.html +86 -28
- data/docs/Helium/Client/Labels.html +29 -86
- data/docs/Helium/Client/Organizations.html +5 -75
- data/docs/Helium/Client/Sensors.html +147 -17
- data/docs/Helium/Client/Users.html +5 -9
- data/docs/Helium/ClientError.html +3 -3
- data/docs/Helium/Collection.html +1053 -0
- data/docs/Helium/Configuration.html +380 -0
- data/docs/Helium/Cursor.html +7 -3
- data/docs/Helium/DataPoint.html +16 -5
- data/docs/Helium/DeviceConfiguration.html +476 -0
- data/docs/Helium/Element.html +203 -43
- data/docs/Helium/Error.html +15 -5
- data/docs/Helium/InvalidApiKey.html +3 -3
- data/docs/Helium/Label.html +35 -36
- data/docs/Helium/Metadata.html +589 -0
- data/docs/Helium/Organization.html +236 -17
- data/docs/Helium/Resource.html +655 -161
- data/docs/Helium/Sensor.html +345 -111
- data/docs/Helium/Timeseries.html +354 -0
- data/docs/Helium/User.html +161 -18
- data/docs/Helium/Utils.html +56 -4
- data/docs/_index.html +72 -7
- data/docs/class_list.html +1 -1
- data/docs/css/style.css +8 -1
- data/docs/file.README.html +66 -6
- data/docs/frames.html +1 -1
- data/docs/index.html +66 -6
- data/docs/method_list.html +619 -139
- data/docs/top-level-namespace.html +3 -3
- data/lib/helium.rb +2 -0
- data/lib/helium/client/configurations.rb +0 -12
- data/lib/helium/client/elements.rb +0 -12
- data/lib/helium/client/labels.rb +1 -12
- data/lib/helium/client/organizations.rb +1 -47
- data/lib/helium/client/sensors.rb +0 -12
- data/lib/helium/client/users.rb +1 -3
- data/lib/helium/collection.rb +129 -0
- data/lib/helium/configuration.rb +5 -1
- data/lib/helium/element.rb +1 -1
- data/lib/helium/label.rb +1 -3
- data/lib/helium/metadata.rb +58 -0
- data/lib/helium/organization.rb +4 -4
- data/lib/helium/resource.rb +28 -29
- data/lib/helium/sensor.rb +1 -1
- data/lib/helium/version.rb +1 -1
- metadata +11 -2
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: Helium::InvalidApiKey
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -147,9 +147,9 @@
|
|
147
147
|
</div>
|
148
148
|
|
149
149
|
<div id="footer">
|
150
|
-
Generated on Thu
|
150
|
+
Generated on Thu Jan 12 15:58:34 2017 by
|
151
151
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
152
|
-
0.9.
|
152
|
+
0.9.5 (ruby-2.3.1).
|
153
153
|
</div>
|
154
154
|
|
155
155
|
</div>
|
data/docs/Helium/Label.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Helium::Label
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.5
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -145,7 +145,7 @@
|
|
145
145
|
|
146
146
|
|
147
147
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Resource.html" title="Helium::Resource (class)">Resource</a></span></h3>
|
148
|
-
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Helium::Resource#id (method)">#id</a></span>, <span class='object_link'><a href="Resource.html#type-instance_method" title="Helium::Resource#type (method)">#type</a></span></p>
|
148
|
+
<p class="inherited"><span class='object_link'><a href="Resource.html#id-instance_method" title="Helium::Resource#id (method)">#id</a></span>, <span class='object_link'><a href="Resource.html#params-instance_method" title="Helium::Resource#params (method)">#params</a></span>, <span class='object_link'><a href="Resource.html#type-instance_method" title="Helium::Resource#type (method)">#type</a></span></p>
|
149
149
|
|
150
150
|
|
151
151
|
|
@@ -265,8 +265,7 @@
|
|
265
265
|
|
266
266
|
|
267
267
|
|
268
|
-
<span class="summary_desc"><div class='inline'
|
269
|
-
</div></span>
|
268
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
270
269
|
|
271
270
|
</li>
|
272
271
|
|
@@ -284,7 +283,18 @@
|
|
284
283
|
|
285
284
|
|
286
285
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Resource.html" title="Helium::Resource (class)">Resource</a></span></h3>
|
287
|
-
<p class="inherited"><span class='object_link'><a href="Resource.html#%3D%3D-instance_method" title="Helium::Resource#== (method)">#==</a></span>, <span class='object_link'><a href="Resource.html#all-class_method" title="Helium::Resource.all (method)">all</a></span>, <span class='object_link'><a href="Resource.html#create-class_method" title="Helium::Resource.create (method)">create</a></span>, <span class='object_link'><a href="Resource.html#created_at-instance_method" title="Helium::Resource#created_at (method)">#created_at</a></span>, <span class='object_link'><a href="Resource.html#destroy-instance_method" title="Helium::Resource#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="Resource.html#eql%3F-instance_method" title="Helium::Resource#eql? (method)">#eql?</a></span>, <span class='object_link'><a href="Resource.html#find-class_method" title="Helium::Resource.find (method)">find</a></span>, <span class='object_link'><a href="Resource.html#hash-instance_method" title="Helium::Resource#hash (method)">#hash</a></span>, <span class='object_link'><a href="Resource.html#to_json-instance_method" title="Helium::Resource#to_json (method)">#to_json</a></span>, <span class='object_link'><a href="Resource.html#update-instance_method" title="Helium::Resource#update (method)">#update</a></span>, <span class='object_link'><a href="Resource.html#updated_at-instance_method" title="Helium::Resource#updated_at (method)">#updated_at</a></span></p>
|
286
|
+
<p class="inherited"><span class='object_link'><a href="Resource.html#%3D%3D-instance_method" title="Helium::Resource#== (method)">#==</a></span>, <span class='object_link'><a href="Resource.html#all-class_method" title="Helium::Resource.all (method)">all</a></span>, <span class='object_link'><a href="Resource.html#all_path-class_method" title="Helium::Resource.all_path (method)">all_path</a></span>, <span class='object_link'><a href="Resource.html#create-class_method" title="Helium::Resource.create (method)">create</a></span>, <span class='object_link'><a href="Resource.html#created_at-instance_method" title="Helium::Resource#created_at (method)">#created_at</a></span>, <span class='object_link'><a href="Resource.html#destroy-instance_method" title="Helium::Resource#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="Resource.html#eql%3F-instance_method" title="Helium::Resource#eql? (method)">#eql?</a></span>, <span class='object_link'><a href="Resource.html#find-class_method" title="Helium::Resource.find (method)">find</a></span>, <span class='object_link'><a href="Resource.html#hash-instance_method" title="Helium::Resource#hash (method)">#hash</a></span>, <span class='object_link'><a href="Resource.html#initialize_from_path-class_method" title="Helium::Resource.initialize_from_path (method)">initialize_from_path</a></span>, <span class='object_link'><a href="Resource.html#metadata-instance_method" title="Helium::Resource#metadata (method)">#metadata</a></span>, <span class='object_link'><a href="Resource.html#resource_name-class_method" title="Helium::Resource.resource_name (method)">resource_name</a></span>, <span class='object_link'><a href="Resource.html#resource_name-instance_method" title="Helium::Resource#resource_name (method)">#resource_name</a></span>, <span class='object_link'><a href="Resource.html#resource_path-instance_method" title="Helium::Resource#resource_path (method)">#resource_path</a></span>, <span class='object_link'><a href="Resource.html#singleton-class_method" title="Helium::Resource.singleton (method)">singleton</a></span>, <span class='object_link'><a href="Resource.html#to_json-instance_method" title="Helium::Resource#to_json (method)">#to_json</a></span>, <span class='object_link'><a href="Resource.html#update-instance_method" title="Helium::Resource#update (method)">#update</a></span>, <span class='object_link'><a href="Resource.html#updated_at-instance_method" title="Helium::Resource#updated_at (method)">#updated_at</a></span></p>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Utils.html" title="Helium::Utils (module)">Utils</a></span></h3>
|
297
|
+
<p class="inherited"><span class='object_link'><a href="Utils.html#datetime_to_iso-instance_method" title="Helium::Utils#datetime_to_iso (method)">#datetime_to_iso</a></span>, <span class='object_link'><a href="Utils.html#kebab_case-instance_method" title="Helium::Utils#kebab_case (method)">#kebab_case</a></span></p>
|
288
298
|
<div id="constructor_details" class="method_details_list">
|
289
299
|
<h2>Constructor Details</h2>
|
290
300
|
|
@@ -401,14 +411,14 @@
|
|
401
411
|
<pre class="lines">
|
402
412
|
|
403
413
|
|
414
|
+
15
|
415
|
+
16
|
404
416
|
17
|
405
417
|
18
|
406
|
-
19
|
407
|
-
20
|
408
|
-
21</pre>
|
418
|
+
19</pre>
|
409
419
|
</td>
|
410
420
|
<td>
|
411
|
-
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line
|
421
|
+
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line 15</span>
|
412
422
|
|
413
423
|
<span class='kw'>def</span> <span class='id identifier rubyid_add_sensors'>add_sensors</span><span class='lparen'>(</span><span class='id identifier rubyid_sensors_to_add'>sensors_to_add</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
414
424
|
<span class='id identifier rubyid_sensors_to_add'>sensors_to_add</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_sensors_to_add'>sensors_to_add</span><span class='rparen'>)</span>
|
@@ -445,14 +455,14 @@
|
|
445
455
|
<pre class="lines">
|
446
456
|
|
447
457
|
|
458
|
+
28
|
459
|
+
29
|
448
460
|
30
|
449
461
|
31
|
450
|
-
32
|
451
|
-
33
|
452
|
-
34</pre>
|
462
|
+
32</pre>
|
453
463
|
</td>
|
454
464
|
<td>
|
455
|
-
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line
|
465
|
+
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line 28</span>
|
456
466
|
|
457
467
|
<span class='kw'>def</span> <span class='id identifier rubyid_as_json'>as_json</span>
|
458
468
|
<span class='kw'>super</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
@@ -479,14 +489,14 @@
|
|
479
489
|
<pre class="lines">
|
480
490
|
|
481
491
|
|
492
|
+
21
|
493
|
+
22
|
482
494
|
23
|
483
495
|
24
|
484
|
-
25
|
485
|
-
26
|
486
|
-
27</pre>
|
496
|
+
25</pre>
|
487
497
|
</td>
|
488
498
|
<td>
|
489
|
-
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line
|
499
|
+
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line 21</span>
|
490
500
|
|
491
501
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove_sensors'>remove_sensors</span><span class='lparen'>(</span><span class='id identifier rubyid_sensors_to_remove'>sensors_to_remove</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
492
502
|
<span class='id identifier rubyid_sensors_to_remove'>sensors_to_remove</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_sensors_to_remove'>sensors_to_remove</span><span class='rparen'>)</span>
|
@@ -507,32 +517,21 @@
|
|
507
517
|
|
508
518
|
|
509
519
|
|
510
|
-
</h3><
|
511
|
-
<div class="discussion">
|
512
|
-
<p>TODO: would be nice to wrap this in a proxy collection, that way
|
513
|
-
we could do something like label.sensors << new_sensor</p>
|
514
|
-
|
515
|
-
|
516
|
-
</div>
|
517
|
-
</div>
|
518
|
-
<div class="tags">
|
519
|
-
|
520
|
-
|
521
|
-
</div><table class="source_code">
|
520
|
+
</h3><table class="source_code">
|
522
521
|
<tr>
|
523
522
|
<td>
|
524
523
|
<pre class="lines">
|
525
524
|
|
526
525
|
|
527
|
-
|
528
|
-
|
529
|
-
|
526
|
+
11
|
527
|
+
12
|
528
|
+
13</pre>
|
530
529
|
</td>
|
531
530
|
<td>
|
532
|
-
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line
|
531
|
+
<pre class="code"><span class="info file"># File 'lib/helium/label.rb', line 11</span>
|
533
532
|
|
534
533
|
<span class='kw'>def</span> <span class='id identifier rubyid_sensors'>sensors</span>
|
535
|
-
<span class='
|
534
|
+
<span class='const'>Collection</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>klass:</span> <span class='const'>Sensor</span><span class='comma'>,</span> <span class='label'>client:</span> <span class='ivar'>@client</span><span class='comma'>,</span> <span class='label'>belongs_to:</span> <span class='kw'>self</span><span class='rparen'>)</span>
|
536
535
|
<span class='kw'>end</span></pre>
|
537
536
|
</td>
|
538
537
|
</tr>
|
@@ -544,9 +543,9 @@ we could do something like label.sensors << new_sensor</p>
|
|
544
543
|
</div>
|
545
544
|
|
546
545
|
<div id="footer">
|
547
|
-
Generated on Thu
|
546
|
+
Generated on Thu Jan 12 15:58:34 2017 by
|
548
547
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
549
|
-
0.9.
|
548
|
+
0.9.5 (ruby-2.3.1).
|
550
549
|
</div>
|
551
550
|
|
552
551
|
</div>
|
@@ -0,0 +1,589 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Helium::Metadata
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.5
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Helium::Metadata";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (M)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Helium.html" title="Helium (module)">Helium</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Metadata</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<iframe id="search_frame" src="../class_list.html"></iframe>
|
63
|
+
|
64
|
+
<div id="content"><h1>Class: Helium::Metadata
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
</h1>
|
69
|
+
<div class="box_info">
|
70
|
+
|
71
|
+
<dl>
|
72
|
+
<dt>Inherits:</dt>
|
73
|
+
<dd>
|
74
|
+
<span class="inheritName">Object</span>
|
75
|
+
|
76
|
+
<ul class="fullTree">
|
77
|
+
<li>Object</li>
|
78
|
+
|
79
|
+
<li class="next">Helium::Metadata</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/helium/metadata.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>TODO make Metadata inherit from Resource and implement method_missing
|
107
|
+
for all resources to automatically generate methods for attributes
|
108
|
+
rather than whitelisting them with hardcoding</p>
|
109
|
+
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
<div class="tags">
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<h2>
|
125
|
+
Instance Method Summary
|
126
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
127
|
+
</h2>
|
128
|
+
|
129
|
+
<ul class="summary">
|
130
|
+
|
131
|
+
<li class="public ">
|
132
|
+
<span class="summary_signature">
|
133
|
+
|
134
|
+
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Object </a>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
149
|
+
|
150
|
+
</li>
|
151
|
+
|
152
|
+
|
153
|
+
<li class="public ">
|
154
|
+
<span class="summary_signature">
|
155
|
+
|
156
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) ⇒ Metadata </a>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
</span>
|
161
|
+
|
162
|
+
|
163
|
+
<span class="note title constructor">constructor</span>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
<span class="summary_desc"><div class='inline'><p>A new instance of Metadata.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="public ">
|
179
|
+
<span class="summary_signature">
|
180
|
+
|
181
|
+
<a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> ⇒ Object </a>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
196
|
+
|
197
|
+
</li>
|
198
|
+
|
199
|
+
|
200
|
+
<li class="public ">
|
201
|
+
<span class="summary_signature">
|
202
|
+
|
203
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(method_name, *arguments, &block) ⇒ Object </a>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
|
222
|
+
<li class="public ">
|
223
|
+
<span class="summary_signature">
|
224
|
+
|
225
|
+
<a href="#properties-instance_method" title="#properties (instance method)">#<strong>properties</strong> ⇒ Object </a>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
240
|
+
|
241
|
+
</li>
|
242
|
+
|
243
|
+
|
244
|
+
<li class="public ">
|
245
|
+
<span class="summary_signature">
|
246
|
+
|
247
|
+
<a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(method_name, include_private = false) ⇒ Boolean </a>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
</span>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
262
|
+
|
263
|
+
</li>
|
264
|
+
|
265
|
+
|
266
|
+
<li class="public ">
|
267
|
+
<span class="summary_signature">
|
268
|
+
|
269
|
+
<a href="#update-instance_method" title="#update (instance method)">#<strong>update</strong>(attributes = {}) ⇒ Object </a>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</span>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
284
|
+
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
</ul>
|
289
|
+
|
290
|
+
|
291
|
+
<div id="constructor_details" class="method_details_list">
|
292
|
+
<h2>Constructor Details</h2>
|
293
|
+
|
294
|
+
<div class="method_details first">
|
295
|
+
<h3 class="signature first" id="initialize-instance_method">
|
296
|
+
|
297
|
+
#<strong>initialize</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="Helium::Metadata (class)">Metadata</a></span></tt>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
</h3><div class="docstring">
|
304
|
+
<div class="discussion">
|
305
|
+
<p>Returns a new instance of Metadata</p>
|
306
|
+
|
307
|
+
|
308
|
+
</div>
|
309
|
+
</div>
|
310
|
+
<div class="tags">
|
311
|
+
|
312
|
+
|
313
|
+
</div><table class="source_code">
|
314
|
+
<tr>
|
315
|
+
<td>
|
316
|
+
<pre class="lines">
|
317
|
+
|
318
|
+
|
319
|
+
6
|
320
|
+
7
|
321
|
+
8
|
322
|
+
9
|
323
|
+
10
|
324
|
+
11</pre>
|
325
|
+
</td>
|
326
|
+
<td>
|
327
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 6</span>
|
328
|
+
|
329
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
330
|
+
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:client</span><span class='rparen'>)</span>
|
331
|
+
<span class='ivar'>@klass</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:klass</span><span class='rparen'>)</span>
|
332
|
+
|
333
|
+
<span class='ivar'>@params</span> <span class='op'>=</span> <span class='id identifier rubyid_fetch_params'>fetch_params</span>
|
334
|
+
<span class='kw'>end</span></pre>
|
335
|
+
</td>
|
336
|
+
</tr>
|
337
|
+
</table>
|
338
|
+
</div>
|
339
|
+
|
340
|
+
</div>
|
341
|
+
<div id="method_missing_details" class="method_details_list">
|
342
|
+
<h2>Dynamic Method Handling</h2>
|
343
|
+
<p class="notice this">
|
344
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
345
|
+
|
346
|
+
</p>
|
347
|
+
|
348
|
+
<div class="method_details first">
|
349
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
350
|
+
|
351
|
+
#<strong>method_missing</strong>(method_name, *arguments, &block) ⇒ <tt>Object</tt>
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</h3><table class="source_code">
|
358
|
+
<tr>
|
359
|
+
<td>
|
360
|
+
<pre class="lines">
|
361
|
+
|
362
|
+
|
363
|
+
25
|
364
|
+
26
|
365
|
+
27</pre>
|
366
|
+
</td>
|
367
|
+
<td>
|
368
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 25</span>
|
369
|
+
|
370
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
371
|
+
<span class='id identifier rubyid_properties'>properties</span><span class='lbracket'>[</span><span class='id identifier rubyid_method_name'>method_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>super</span>
|
372
|
+
<span class='kw'>end</span></pre>
|
373
|
+
</td>
|
374
|
+
</tr>
|
375
|
+
</table>
|
376
|
+
</div>
|
377
|
+
|
378
|
+
</div>
|
379
|
+
|
380
|
+
|
381
|
+
<div id="instance_method_details" class="method_details_list">
|
382
|
+
<h2>Instance Method Details</h2>
|
383
|
+
|
384
|
+
|
385
|
+
<div class="method_details first">
|
386
|
+
<h3 class="signature first" id="id-instance_method">
|
387
|
+
|
388
|
+
#<strong>id</strong> ⇒ <tt>Object</tt>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
</h3><table class="source_code">
|
395
|
+
<tr>
|
396
|
+
<td>
|
397
|
+
<pre class="lines">
|
398
|
+
|
399
|
+
|
400
|
+
13
|
401
|
+
14
|
402
|
+
15</pre>
|
403
|
+
</td>
|
404
|
+
<td>
|
405
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 13</span>
|
406
|
+
|
407
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
408
|
+
<span class='ivar'>@klass</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
|
409
|
+
<span class='kw'>end</span></pre>
|
410
|
+
</td>
|
411
|
+
</tr>
|
412
|
+
</table>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
<div class="method_details ">
|
416
|
+
<h3 class="signature " id="inspect-instance_method">
|
417
|
+
|
418
|
+
#<strong>inspect</strong> ⇒ <tt>Object</tt>
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</h3><table class="source_code">
|
425
|
+
<tr>
|
426
|
+
<td>
|
427
|
+
<pre class="lines">
|
428
|
+
|
429
|
+
|
430
|
+
21
|
431
|
+
22
|
432
|
+
23</pre>
|
433
|
+
</td>
|
434
|
+
<td>
|
435
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 21</span>
|
436
|
+
|
437
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
438
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'><Helium::Metadata properties=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_properties'>properties</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span>
|
439
|
+
<span class='kw'>end</span></pre>
|
440
|
+
</td>
|
441
|
+
</tr>
|
442
|
+
</table>
|
443
|
+
</div>
|
444
|
+
|
445
|
+
<div class="method_details ">
|
446
|
+
<h3 class="signature " id="properties-instance_method">
|
447
|
+
|
448
|
+
#<strong>properties</strong> ⇒ <tt>Object</tt>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
</h3><table class="source_code">
|
455
|
+
<tr>
|
456
|
+
<td>
|
457
|
+
<pre class="lines">
|
458
|
+
|
459
|
+
|
460
|
+
17
|
461
|
+
18
|
462
|
+
19</pre>
|
463
|
+
</td>
|
464
|
+
<td>
|
465
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 17</span>
|
466
|
+
|
467
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_properties'>properties</span>
|
468
|
+
<span class='ivar'>@params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>attributes</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
469
|
+
<span class='kw'>end</span></pre>
|
470
|
+
</td>
|
471
|
+
</tr>
|
472
|
+
</table>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
<div class="method_details ">
|
476
|
+
<h3 class="signature " id="respond_to_missing?-instance_method">
|
477
|
+
|
478
|
+
#<strong>respond_to_missing?</strong>(method_name, include_private = false) ⇒ <tt>Boolean</tt>
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
</h3><div class="docstring">
|
485
|
+
<div class="discussion">
|
486
|
+
|
487
|
+
|
488
|
+
</div>
|
489
|
+
</div>
|
490
|
+
<div class="tags">
|
491
|
+
|
492
|
+
<p class="tag_title">Returns:</p>
|
493
|
+
<ul class="return">
|
494
|
+
|
495
|
+
<li>
|
496
|
+
|
497
|
+
|
498
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
</li>
|
503
|
+
|
504
|
+
</ul>
|
505
|
+
|
506
|
+
</div><table class="source_code">
|
507
|
+
<tr>
|
508
|
+
<td>
|
509
|
+
<pre class="lines">
|
510
|
+
|
511
|
+
|
512
|
+
29
|
513
|
+
30
|
514
|
+
31</pre>
|
515
|
+
</td>
|
516
|
+
<td>
|
517
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 29</span>
|
518
|
+
|
519
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='id identifier rubyid_include_private'>include_private</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
520
|
+
<span class='id identifier rubyid_properties'>properties</span><span class='lbracket'>[</span><span class='id identifier rubyid_method_name'>method_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>super</span>
|
521
|
+
<span class='kw'>end</span></pre>
|
522
|
+
</td>
|
523
|
+
</tr>
|
524
|
+
</table>
|
525
|
+
</div>
|
526
|
+
|
527
|
+
<div class="method_details ">
|
528
|
+
<h3 class="signature " id="update-instance_method">
|
529
|
+
|
530
|
+
#<strong>update</strong>(attributes = {}) ⇒ <tt>Object</tt>
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
</h3><table class="source_code">
|
537
|
+
<tr>
|
538
|
+
<td>
|
539
|
+
<pre class="lines">
|
540
|
+
|
541
|
+
|
542
|
+
33
|
543
|
+
34
|
544
|
+
35
|
545
|
+
36
|
546
|
+
37
|
547
|
+
38
|
548
|
+
39
|
549
|
+
40
|
550
|
+
41
|
551
|
+
42
|
552
|
+
43
|
553
|
+
44
|
554
|
+
45</pre>
|
555
|
+
</td>
|
556
|
+
<td>
|
557
|
+
<pre class="code"><span class="info file"># File 'lib/helium/metadata.rb', line 33</span>
|
558
|
+
|
559
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
560
|
+
<span class='id identifier rubyid_body'>body</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
561
|
+
<span class='label'>data:</span> <span class='lbrace'>{</span>
|
562
|
+
<span class='label'>attributes:</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='comma'>,</span>
|
563
|
+
<span class='label'>id:</span> <span class='id identifier rubyid_id'>id</span><span class='comma'>,</span>
|
564
|
+
<span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>metadata</span><span class='tstring_end'>"</span></span>
|
565
|
+
<span class='rbrace'>}</span>
|
566
|
+
<span class='rbrace'>}</span>
|
567
|
+
|
568
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_patch'>patch</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>body:</span> <span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span>
|
569
|
+
<span class='ivar'>@params</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
570
|
+
<span class='kw'>return</span> <span class='kw'>self</span>
|
571
|
+
<span class='kw'>end</span></pre>
|
572
|
+
</td>
|
573
|
+
</tr>
|
574
|
+
</table>
|
575
|
+
</div>
|
576
|
+
|
577
|
+
</div>
|
578
|
+
|
579
|
+
</div>
|
580
|
+
|
581
|
+
<div id="footer">
|
582
|
+
Generated on Thu Jan 12 15:58:34 2017 by
|
583
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
584
|
+
0.9.5 (ruby-2.3.1).
|
585
|
+
</div>
|
586
|
+
|
587
|
+
</div>
|
588
|
+
</body>
|
589
|
+
</html>
|