twelvedata_ruby 0.1.1

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.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/CHANGELOG.md +5 -0
  4. data/CODE_OF_CONDUCT.md +84 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +80 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +125 -0
  9. data/Rakefile +12 -0
  10. data/bin/console +22 -0
  11. data/bin/setup +8 -0
  12. data/doc/TwelvedataRuby.html +353 -0
  13. data/doc/TwelvedataRuby/BadRequestResponseError.html +178 -0
  14. data/doc/TwelvedataRuby/Client.html +1443 -0
  15. data/doc/TwelvedataRuby/Endpoint.html +1478 -0
  16. data/doc/TwelvedataRuby/EndpointError.html +247 -0
  17. data/doc/TwelvedataRuby/EndpointNameError.html +167 -0
  18. data/doc/TwelvedataRuby/EndpointParametersKeysError.html +167 -0
  19. data/doc/TwelvedataRuby/EndpointRequiredParametersError.html +167 -0
  20. data/doc/TwelvedataRuby/Error.html +318 -0
  21. data/doc/TwelvedataRuby/ForbiddenResponseError.html +178 -0
  22. data/doc/TwelvedataRuby/InternalServerResponseErro.html +178 -0
  23. data/doc/TwelvedataRuby/NotFoundResponseError.html +178 -0
  24. data/doc/TwelvedataRuby/PageNotFoundResponseError.html +178 -0
  25. data/doc/TwelvedataRuby/ParameterTooLongResponseError.html +178 -0
  26. data/doc/TwelvedataRuby/Request.html +683 -0
  27. data/doc/TwelvedataRuby/Response.html +1622 -0
  28. data/doc/TwelvedataRuby/ResponseError.html +565 -0
  29. data/doc/TwelvedataRuby/TooManyRequestsResponseError.html +178 -0
  30. data/doc/TwelvedataRuby/UnauthorizedResponseError.html +178 -0
  31. data/doc/TwelvedataRuby/Utils.html +503 -0
  32. data/doc/_index.html +315 -0
  33. data/doc/class_list.html +51 -0
  34. data/doc/css/common.css +1 -0
  35. data/doc/css/full_list.css +58 -0
  36. data/doc/css/style.css +497 -0
  37. data/doc/file.README.html +194 -0
  38. data/doc/file_list.html +56 -0
  39. data/doc/frames.html +17 -0
  40. data/doc/index.html +194 -0
  41. data/doc/js/app.js +314 -0
  42. data/doc/js/full_list.js +216 -0
  43. data/doc/js/jquery.js +4 -0
  44. data/doc/method_list.html +707 -0
  45. data/doc/top-level-namespace.html +110 -0
  46. data/lib/twelvedata_ruby.rb +43 -0
  47. data/lib/twelvedata_ruby/client.rb +148 -0
  48. data/lib/twelvedata_ruby/endpoint.rb +271 -0
  49. data/lib/twelvedata_ruby/error.rb +90 -0
  50. data/lib/twelvedata_ruby/request.rb +54 -0
  51. data/lib/twelvedata_ruby/response.rb +132 -0
  52. data/lib/twelvedata_ruby/utils.rb +36 -0
  53. data/twelvedata_ruby.gemspec +37 -0
  54. metadata +201 -0
@@ -0,0 +1,178 @@
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
+ Exception: TwelvedataRuby::TooManyRequestsResponseError
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "TwelvedataRuby::TooManyRequestsResponseError";
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?1"></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 (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../TwelvedataRuby.html" title="TwelvedataRuby (module)">TwelvedataRuby</a></span></span>
41
+ &raquo;
42
+ <span class="title">TooManyRequestsResponseError</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
+ <div id="content"><h1>Exception: TwelvedataRuby::TooManyRequestsResponseError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></li>
80
+
81
+ <li class="next"><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></li>
82
+
83
+ <li class="next">TwelvedataRuby::TooManyRequestsResponseError</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+ </dl>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <dl>
102
+ <dt>Defined in:</dt>
103
+ <dd>lib/twelvedata_ruby/error.rb</dd>
104
+ </dl>
105
+
106
+ </div>
107
+
108
+
109
+
110
+
111
+ <h2>Constant Summary</h2>
112
+
113
+ <h3 class="inherited">Constants inherited
114
+ from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
115
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#API_ERROR_CODES_MAP-constant" title="TwelvedataRuby::ResponseError::API_ERROR_CODES_MAP (constant)">ResponseError::API_ERROR_CODES_MAP</a></span>, <span class='object_link'><a href="ResponseError.html#HTTP_ERROR_CODES_MAP-constant" title="TwelvedataRuby::ResponseError::HTTP_ERROR_CODES_MAP (constant)">ResponseError::HTTP_ERROR_CODES_MAP</a></span></p>
116
+
117
+
118
+
119
+ <h3 class="inherited">Constants inherited
120
+ from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
121
+ <p class="inherited"><span class='object_link'><a href="Error.html#DEFAULT_MSGS-constant" title="TwelvedataRuby::Error::DEFAULT_MSGS (constant)">Error::DEFAULT_MSGS</a></span></p>
122
+
123
+
124
+
125
+
126
+ <h2>Instance Attribute Summary</h2>
127
+
128
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
129
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#code-instance_method" title="TwelvedataRuby::ResponseError#code (method)">#code</a></span>, <span class='object_link'><a href="ResponseError.html#json-instance_method" title="TwelvedataRuby::ResponseError#json (method)">#json</a></span>, <span class='object_link'><a href="ResponseError.html#request-instance_method" title="TwelvedataRuby::ResponseError#request (method)">#request</a></span></p>
130
+
131
+
132
+
133
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
134
+ <p class="inherited"><span class='object_link'><a href="Error.html#attrs-instance_method" title="TwelvedataRuby::Error#attrs (method)">#attrs</a></span></p>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <h2>Method Summary</h2>
145
+
146
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
147
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#error_code_klass-class_method" title="TwelvedataRuby::ResponseError.error_code_klass (method)">error_code_klass</a></span>, <span class='object_link'><a href="ResponseError.html#initialize-instance_method" title="TwelvedataRuby::ResponseError#initialize (method)">#initialize</a></span></p>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
158
+ <p class="inherited"><span class='object_link'><a href="Error.html#initialize-instance_method" title="TwelvedataRuby::Error#initialize (method)">#initialize</a></span></p>
159
+
160
+ <div id="constructor_details" class="method_details_list">
161
+ <h2>Constructor Details</h2>
162
+
163
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="ResponseError.html#initialize-instance_method" title="TwelvedataRuby::ResponseError#initialize (method)">TwelvedataRuby::ResponseError</a></span></p>
164
+
165
+ </div>
166
+
167
+
168
+ </div>
169
+
170
+ <div id="footer">
171
+ Generated on Tue Jul 13 08:56:51 2021 by
172
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
+ 0.9.26 (ruby-3.0.1).
174
+ </div>
175
+
176
+ </div>
177
+ </body>
178
+ </html>
@@ -0,0 +1,178 @@
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
+ Exception: TwelvedataRuby::UnauthorizedResponseError
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "TwelvedataRuby::UnauthorizedResponseError";
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?1"></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 (U)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../TwelvedataRuby.html" title="TwelvedataRuby (module)">TwelvedataRuby</a></span></span>
41
+ &raquo;
42
+ <span class="title">UnauthorizedResponseError</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
+ <div id="content"><h1>Exception: TwelvedataRuby::UnauthorizedResponseError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></li>
80
+
81
+ <li class="next"><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></li>
82
+
83
+ <li class="next">TwelvedataRuby::UnauthorizedResponseError</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+ </dl>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <dl>
102
+ <dt>Defined in:</dt>
103
+ <dd>lib/twelvedata_ruby/error.rb</dd>
104
+ </dl>
105
+
106
+ </div>
107
+
108
+
109
+
110
+
111
+ <h2>Constant Summary</h2>
112
+
113
+ <h3 class="inherited">Constants inherited
114
+ from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
115
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#API_ERROR_CODES_MAP-constant" title="TwelvedataRuby::ResponseError::API_ERROR_CODES_MAP (constant)">ResponseError::API_ERROR_CODES_MAP</a></span>, <span class='object_link'><a href="ResponseError.html#HTTP_ERROR_CODES_MAP-constant" title="TwelvedataRuby::ResponseError::HTTP_ERROR_CODES_MAP (constant)">ResponseError::HTTP_ERROR_CODES_MAP</a></span></p>
116
+
117
+
118
+
119
+ <h3 class="inherited">Constants inherited
120
+ from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
121
+ <p class="inherited"><span class='object_link'><a href="Error.html#DEFAULT_MSGS-constant" title="TwelvedataRuby::Error::DEFAULT_MSGS (constant)">Error::DEFAULT_MSGS</a></span></p>
122
+
123
+
124
+
125
+
126
+ <h2>Instance Attribute Summary</h2>
127
+
128
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
129
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#code-instance_method" title="TwelvedataRuby::ResponseError#code (method)">#code</a></span>, <span class='object_link'><a href="ResponseError.html#json-instance_method" title="TwelvedataRuby::ResponseError#json (method)">#json</a></span>, <span class='object_link'><a href="ResponseError.html#request-instance_method" title="TwelvedataRuby::ResponseError#request (method)">#request</a></span></p>
130
+
131
+
132
+
133
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
134
+ <p class="inherited"><span class='object_link'><a href="Error.html#attrs-instance_method" title="TwelvedataRuby::Error#attrs (method)">#attrs</a></span></p>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <h2>Method Summary</h2>
145
+
146
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
147
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#error_code_klass-class_method" title="TwelvedataRuby::ResponseError.error_code_klass (method)">error_code_klass</a></span>, <span class='object_link'><a href="ResponseError.html#initialize-instance_method" title="TwelvedataRuby::ResponseError#initialize (method)">#initialize</a></span></p>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
158
+ <p class="inherited"><span class='object_link'><a href="Error.html#initialize-instance_method" title="TwelvedataRuby::Error#initialize (method)">#initialize</a></span></p>
159
+
160
+ <div id="constructor_details" class="method_details_list">
161
+ <h2>Constructor Details</h2>
162
+
163
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="ResponseError.html#initialize-instance_method" title="TwelvedataRuby::ResponseError#initialize (method)">TwelvedataRuby::ResponseError</a></span></p>
164
+
165
+ </div>
166
+
167
+
168
+ </div>
169
+
170
+ <div id="footer">
171
+ Generated on Tue Jul 13 08:56:50 2021 by
172
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
+ 0.9.26 (ruby-3.0.1).
174
+ </div>
175
+
176
+ </div>
177
+ </body>
178
+ </html>
@@ -0,0 +1,503 @@
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
+ Module: TwelvedataRuby::Utils
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "TwelvedataRuby::Utils";
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?1"></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 (U)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../TwelvedataRuby.html" title="TwelvedataRuby (module)">TwelvedataRuby</a></span></span>
41
+ &raquo;
42
+ <span class="title">Utils</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
+ <div id="content"><h1>Module: TwelvedataRuby::Utils
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/twelvedata_ruby/utils.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <h2>
95
+ Class Method Summary
96
+ <small><a href="#" class="summary_toggle">collapse</a></small>
97
+ </h2>
98
+
99
+ <ul class="summary">
100
+
101
+ <li class="public ">
102
+ <span class="summary_signature">
103
+
104
+ <a href="#call_block_if_truthy-class_method" title="call_block_if_truthy (class method)">.<strong>call_block_if_truthy</strong>(truthy_val, return_this = nil, &amp;block) &#x21d2; Object </a>
105
+
106
+
107
+
108
+ </span>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <span class="summary_desc"><div class='inline'></div></span>
119
+
120
+ </li>
121
+
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#camelize-class_method" title="camelize (class method)">.<strong>camelize</strong>(str) &#x21d2; Object </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ <li class="public ">
146
+ <span class="summary_signature">
147
+
148
+ <a href="#demodulize-class_method" title="demodulize (class method)">.<strong>demodulize</strong>(obj) &#x21d2; Object </a>
149
+
150
+
151
+
152
+ </span>
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <span class="summary_desc"><div class='inline'></div></span>
163
+
164
+ </li>
165
+
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#empty_to_nil-class_method" title="empty_to_nil (class method)">.<strong>empty_to_nil</strong>(obj) &#x21d2; Object </a>
171
+
172
+
173
+
174
+ </span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'></div></span>
185
+
186
+ </li>
187
+
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#return_nil_unless_true-class_method" title="return_nil_unless_true (class method)">.<strong>return_nil_unless_true</strong>(is_true, &amp;block) &#x21d2; Object </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+ <span class="summary_desc"><div class='inline'></div></span>
207
+
208
+ </li>
209
+
210
+
211
+ <li class="public ">
212
+ <span class="summary_signature">
213
+
214
+ <a href="#to_a-class_method" title="to_a (class method)">.<strong>to_a</strong>(objects) &#x21d2; Object </a>
215
+
216
+
217
+
218
+ </span>
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <span class="summary_desc"><div class='inline'></div></span>
229
+
230
+ </li>
231
+
232
+
233
+ <li class="public ">
234
+ <span class="summary_signature">
235
+
236
+ <a href="#to_d-class_method" title="to_d (class method)">.<strong>to_d</strong>(obj, default_value = nil) &#x21d2; Object </a>
237
+
238
+
239
+
240
+ </span>
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ <span class="summary_desc"><div class='inline'>
251
+ <p>Converts a string to integer an all integer or nothing.</p>
252
+ </div></span>
253
+
254
+ </li>
255
+
256
+
257
+ </ul>
258
+
259
+
260
+
261
+
262
+ <div id="class_method_details" class="method_details_list">
263
+ <h2>Class Method Details</h2>
264
+
265
+
266
+ <div class="method_details first">
267
+ <h3 class="signature first" id="call_block_if_truthy-class_method">
268
+
269
+ .<strong>call_block_if_truthy</strong>(truthy_val, return_this = nil, &amp;block) &#x21d2; <tt>Object</tt>
270
+
271
+
272
+
273
+
274
+
275
+ </h3><table class="source_code">
276
+ <tr>
277
+ <td>
278
+ <pre class="lines">
279
+
280
+
281
+ 28
282
+ 29
283
+ 30</pre>
284
+ </td>
285
+ <td>
286
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 28</span>
287
+
288
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_call_block_if_truthy'>call_block_if_truthy</span><span class='lparen'>(</span><span class='id identifier rubyid_truthy_val'>truthy_val</span><span class='comma'>,</span> <span class='id identifier rubyid_return_this'>return_this</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
289
+ <span class='id identifier rubyid_truthy_val'>truthy_val</span> <span class='op'>?</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='op'>:</span> <span class='id identifier rubyid_return_this'>return_this</span>
290
+ <span class='kw'>end</span></pre>
291
+ </td>
292
+ </tr>
293
+ </table>
294
+ </div>
295
+
296
+ <div class="method_details ">
297
+ <h3 class="signature " id="camelize-class_method">
298
+
299
+ .<strong>camelize</strong>(str) &#x21d2; <tt>Object</tt>
300
+
301
+
302
+
303
+
304
+
305
+ </h3><table class="source_code">
306
+ <tr>
307
+ <td>
308
+ <pre class="lines">
309
+
310
+
311
+ 16
312
+ 17
313
+ 18</pre>
314
+ </td>
315
+ <td>
316
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 16</span>
317
+
318
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='rparen'>)</span>
319
+ <span class='id identifier rubyid_str'>str</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>_</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:capitalize</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
320
+ <span class='kw'>end</span></pre>
321
+ </td>
322
+ </tr>
323
+ </table>
324
+ </div>
325
+
326
+ <div class="method_details ">
327
+ <h3 class="signature " id="demodulize-class_method">
328
+
329
+ .<strong>demodulize</strong>(obj) &#x21d2; <tt>Object</tt>
330
+
331
+
332
+
333
+
334
+
335
+ </h3><table class="source_code">
336
+ <tr>
337
+ <td>
338
+ <pre class="lines">
339
+
340
+
341
+ 5
342
+ 6
343
+ 7</pre>
344
+ </td>
345
+ <td>
346
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 5</span>
347
+
348
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_demodulize'>demodulize</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
349
+ <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^.+::</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
350
+ <span class='kw'>end</span></pre>
351
+ </td>
352
+ </tr>
353
+ </table>
354
+ </div>
355
+
356
+ <div class="method_details ">
357
+ <h3 class="signature " id="empty_to_nil-class_method">
358
+
359
+ .<strong>empty_to_nil</strong>(obj) &#x21d2; <tt>Object</tt>
360
+
361
+
362
+
363
+
364
+
365
+ </h3><table class="source_code">
366
+ <tr>
367
+ <td>
368
+ <pre class="lines">
369
+
370
+
371
+ 20
372
+ 21
373
+ 22</pre>
374
+ </td>
375
+ <td>
376
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 20</span>
377
+
378
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_empty_to_nil'>empty_to_nil</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
379
+ <span class='op'>!</span><span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='kw'>nil</span> <span class='op'>:</span> <span class='id identifier rubyid_obj'>obj</span>
380
+ <span class='kw'>end</span></pre>
381
+ </td>
382
+ </tr>
383
+ </table>
384
+ </div>
385
+
386
+ <div class="method_details ">
387
+ <h3 class="signature " id="return_nil_unless_true-class_method">
388
+
389
+ .<strong>return_nil_unless_true</strong>(is_true, &amp;block) &#x21d2; <tt>Object</tt>
390
+
391
+
392
+
393
+
394
+
395
+ </h3><table class="source_code">
396
+ <tr>
397
+ <td>
398
+ <pre class="lines">
399
+
400
+
401
+ 32
402
+ 33
403
+ 34</pre>
404
+ </td>
405
+ <td>
406
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 32</span>
407
+
408
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_return_nil_unless_true'>return_nil_unless_true</span><span class='lparen'>(</span><span class='id identifier rubyid_is_true'>is_true</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
409
+ <span class='id identifier rubyid_call_block_if_truthy'>call_block_if_truthy</span><span class='lparen'>(</span><span class='id identifier rubyid_is_true'>is_true</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='rbrace'>}</span>
410
+ <span class='kw'>end</span></pre>
411
+ </td>
412
+ </tr>
413
+ </table>
414
+ </div>
415
+
416
+ <div class="method_details ">
417
+ <h3 class="signature " id="to_a-class_method">
418
+
419
+ .<strong>to_a</strong>(objects) &#x21d2; <tt>Object</tt>
420
+
421
+
422
+
423
+
424
+
425
+ </h3><table class="source_code">
426
+ <tr>
427
+ <td>
428
+ <pre class="lines">
429
+
430
+
431
+ 24
432
+ 25
433
+ 26</pre>
434
+ </td>
435
+ <td>
436
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 24</span>
437
+
438
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='lparen'>(</span><span class='id identifier rubyid_objects'>objects</span><span class='rparen'>)</span>
439
+ <span class='id identifier rubyid_objects'>objects</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_objects'>objects</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_objects'>objects</span><span class='rbracket'>]</span>
440
+ <span class='kw'>end</span></pre>
441
+ </td>
442
+ </tr>
443
+ </table>
444
+ </div>
445
+
446
+ <div class="method_details ">
447
+ <h3 class="signature " id="to_d-class_method">
448
+
449
+ .<strong>to_d</strong>(obj, default_value = nil) &#x21d2; <tt>Object</tt>
450
+
451
+
452
+
453
+
454
+
455
+ </h3><div class="docstring">
456
+ <div class="discussion">
457
+
458
+ <p>Converts a string to integer an all integer or nothing</p>
459
+
460
+
461
+ </div>
462
+ </div>
463
+ <div class="tags">
464
+
465
+
466
+ </div><table class="source_code">
467
+ <tr>
468
+ <td>
469
+ <pre class="lines">
470
+
471
+
472
+ 10
473
+ 11
474
+ 12
475
+ 13
476
+ 14</pre>
477
+ </td>
478
+ <td>
479
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/utils.rb', line 10</span>
480
+
481
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_d'>to_d</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='comma'>,</span> <span class='id identifier rubyid_default_value'>default_value</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
482
+ <span class='kw'>return</span> <span class='id identifier rubyid_obj'>obj</span> <span class='kw'>if</span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
483
+
484
+ <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\d+$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='const'>Integer</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='op'>||</span> <span class='id identifier rubyid_default_value'>default_value</span>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ </div>
492
+
493
+ </div>
494
+
495
+ <div id="footer">
496
+ Generated on Tue Jul 13 08:56:48 2021 by
497
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
498
+ 0.9.26 (ruby-3.0.1).
499
+ </div>
500
+
501
+ </div>
502
+ </body>
503
+ </html>