xbrlware-ce 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/ReleaseNotes.txt +23 -5
  2. data/doc/classes/Edgar/RSSFeedDownloader.html +2 -2
  3. data/doc/classes/NSAware.html +135 -0
  4. data/doc/classes/Xbrlware.html +1 -6
  5. data/doc/classes/Xbrlware/Context.html +85 -78
  6. data/doc/classes/Xbrlware/Context/Period.html +49 -49
  7. data/doc/classes/Xbrlware/Entity.html +49 -49
  8. data/doc/classes/Xbrlware/Identifier.html +14 -14
  9. data/doc/classes/Xbrlware/Instance.html +173 -98
  10. data/doc/classes/Xbrlware/Item.html +62 -25
  11. data/doc/classes/Xbrlware/Linkbase/CalculationLinkbase.html +41 -3
  12. data/doc/classes/Xbrlware/Linkbase/CalculationLinkbase/Calculation.html +1 -1
  13. data/doc/classes/Xbrlware/Linkbase/CalculationLinkbase/Calculation/CalculationArc.html +1 -1
  14. data/doc/classes/Xbrlware/Linkbase/DefinitionLinkbase.html +43 -3
  15. data/doc/classes/Xbrlware/Linkbase/DefinitionLinkbase/Definition.html +2 -2
  16. data/doc/classes/Xbrlware/Linkbase/DefinitionLinkbase/Definition/DefinitionArc.html +1 -1
  17. data/doc/classes/Xbrlware/Linkbase/LabelLinkbase/Label.html +1 -1
  18. data/doc/classes/Xbrlware/Linkbase/Linkbase/Link/Arc.html +22 -7
  19. data/doc/classes/Xbrlware/Linkbase/PresentationLinkbase.html +41 -3
  20. data/doc/classes/Xbrlware/Linkbase/PresentationLinkbase/Presentation.html +2 -8
  21. data/doc/classes/Xbrlware/Linkbase/PresentationLinkbase/Presentation/PresentationArc.html +1 -1
  22. data/doc/classes/Xbrlware/Taxonomy.html +84 -51
  23. data/doc/classes/Xbrlware/TaxonomyDefintion.html +14 -14
  24. data/doc/classes/Xbrlware/Unit.html +14 -7
  25. data/doc/classes/Xbrlware/Unit/Divide.html +7 -7
  26. data/doc/created.rid +1 -1
  27. data/doc/files/lib/edgar/edgar_data_downloader_rb.html +1 -1
  28. data/doc/files/lib/edgar_rb.html +1 -1
  29. data/doc/files/lib/xbrlware/context_rb.html +1 -1
  30. data/doc/files/lib/xbrlware/instance_rb.html +1 -1
  31. data/doc/files/lib/xbrlware/item_rb.html +1 -1
  32. data/doc/files/lib/xbrlware/linkbase/calculation_linkbase_rb.html +1 -1
  33. data/doc/files/lib/xbrlware/linkbase/definition_linkbase_rb.html +1 -1
  34. data/doc/files/lib/xbrlware/linkbase/label_linkbase_rb.html +1 -1
  35. data/doc/files/lib/xbrlware/linkbase/linkbase_rb.html +1 -1
  36. data/doc/files/lib/xbrlware/linkbase/presentation_linkbase_rb.html +1 -1
  37. data/doc/files/lib/xbrlware/{report_rb.html → ns_aware_rb.html} +10 -4
  38. data/doc/files/lib/xbrlware/taxonomy_rb.html +1 -1
  39. data/doc/files/lib/xbrlware/unit_rb.html +1 -1
  40. data/doc/files/lib/xbrlware/util_rb.html +1 -1
  41. data/doc/files/lib/xbrlware/version_rb.html +1 -1
  42. data/doc/files/lib/xbrlware/xml_parser_rb.html +1 -1
  43. data/doc/files/lib/xbrlware_rb.html +3 -1
  44. data/doc/fr_class_index.html +1 -1
  45. data/doc/fr_file_index.html +1 -1
  46. data/doc/fr_method_index.html +68 -68
  47. data/doc/index.html +2 -2
  48. data/example/callb/calculation_elements.rb +33 -0
  49. data/example/callb/calculation_elements_to_table.rb +62 -0
  50. data/example/case_study/cash_analyzer.rb +27 -0
  51. data/lib/edgar/edgar_data_downloader.rb +6 -6
  52. data/lib/xbrlware.rb +2 -0
  53. data/lib/xbrlware/context.rb +2 -0
  54. data/lib/xbrlware/instance.rb +65 -26
  55. data/lib/xbrlware/item.rb +34 -26
  56. data/lib/xbrlware/linkbase/calculation_linkbase.rb +51 -7
  57. data/lib/xbrlware/linkbase/definition_linkbase.rb +42 -2
  58. data/lib/xbrlware/linkbase/label_linkbase.rb +1 -0
  59. data/lib/xbrlware/linkbase/linkbase.rb +19 -9
  60. data/lib/xbrlware/linkbase/presentation_linkbase.rb +52 -9
  61. data/lib/xbrlware/ns_aware.rb +5 -0
  62. data/lib/xbrlware/taxonomy.rb +7 -0
  63. data/lib/xbrlware/unit.rb +1 -0
  64. data/lib/xbrlware/version.rb +1 -1
  65. data/lib/xbrlware/xml_parser.rb +20 -0
  66. data/test/lib/edgar/edgar_data_downloader_test.rb +1 -1
  67. data/test/lib/edgar/resources/usgaap.rss.xml +3914 -2599
  68. data/test/lib/xbrlware/46_item_test.rb +30 -0
  69. data/test/lib/xbrlware/47_context_test.rb +16 -8
  70. data/test/lib/xbrlware/48_unit_test.rb +10 -0
  71. data/test/lib/xbrlware/instance_test.rb +156 -2
  72. data/test/lib/xbrlware/linkbase/calculation_linkbase_test.rb +5 -5
  73. data/test/lib/xbrlware/linkbase/definition_linkbase_test.rb +2 -2
  74. data/test/lib/xbrlware/linkbase/presentation_linkbase_test.rb +0 -1
  75. data/test/lib/xbrlware/taxonomy_test.rb +28 -0
  76. data/test/lib/xbrlware/xml_parser_test.rb +81 -0
  77. data/test/scratchpad/tooltip.html +10 -0
  78. data/xbrlware-ce.gemspec +2 -0
  79. metadata +36 -22
  80. data/Rakefile.rb +0 -124
  81. data/doc/classes/Xbrlware/Report.html +0 -352
  82. data/lib/xbrlware/report.rb +0 -277
  83. data/test/lib/xbrlware/resources/report_test_xbrl_files/cal.xml +0 -219
  84. data/test/lib/xbrlware/resources/report_test_xbrl_files/def.xml +0 -186
  85. data/test/lib/xbrlware/resources/report_test_xbrl_files/instance.xml +0 -5822
  86. data/test/lib/xbrlware/resources/report_test_xbrl_files/lab.xml +0 -782
  87. data/test/lib/xbrlware/resources/report_test_xbrl_files/pre.xml +0 -485
  88. data/test/lib/xbrlware/resources/report_test_xbrl_files/report/report_index.html +0 -62
  89. data/test/lib/xbrlware/resources/report_test_xbrl_files/taxonomy.xsd +0 -178
  90. data/xbrlware.iml +0 -30
@@ -95,22 +95,24 @@ instance page on xbrlware wiki</a> for more details.
95
95
  <h3 class="section-bar">Methods</h3>
96
96
 
97
97
  <div class="name-list">
98
- <a href="#M000078">context</a>&nbsp;&nbsp;
98
+ <a href="#M000076">context</a>&nbsp;&nbsp;
99
99
  <a href="#M000086">context_for_item</a>&nbsp;&nbsp;
100
- <a href="#M000079">ctx_groupby_dim</a>&nbsp;&nbsp;
101
- <a href="#M000082">ctx_groupby_dim_dom_print</a>&nbsp;&nbsp;
102
- <a href="#M000080">ctx_groupby_dom</a>&nbsp;&nbsp;
103
- <a href="#M000081">ctx_groupby_period</a>&nbsp;&nbsp;
100
+ <a href="#M000077">ctx_groupby_dim</a>&nbsp;&nbsp;
101
+ <a href="#M000080">ctx_groupby_dim_dom_print</a>&nbsp;&nbsp;
102
+ <a href="#M000078">ctx_groupby_dom</a>&nbsp;&nbsp;
103
+ <a href="#M000079">ctx_groupby_period</a>&nbsp;&nbsp;
104
104
  <a href="#M000090">entity_details</a>&nbsp;&nbsp;
105
105
  <a href="#M000089">entity_details=</a>&nbsp;&nbsp;
106
106
  <a href="#M000088">footnotes</a>&nbsp;&nbsp;
107
+ <a href="#M000081">inspect</a>&nbsp;&nbsp;
107
108
  <a href="#M000085">item</a>&nbsp;&nbsp;
109
+ <a href="#M000083">item_all</a>&nbsp;&nbsp;
108
110
  <a href="#M000084">item_all_map</a>&nbsp;&nbsp;
109
111
  <a href="#M000087">item_ctx_filter</a>&nbsp;&nbsp;
110
- <a href="#M000075">new</a>&nbsp;&nbsp;
111
- <a href="#M000076">raw</a>&nbsp;&nbsp;
112
- <a href="#M000077">schema_ref</a>&nbsp;&nbsp;
113
- <a href="#M000083">unit</a>&nbsp;&nbsp;
112
+ <a href="#M000073">new</a>&nbsp;&nbsp;
113
+ <a href="#M000074">raw</a>&nbsp;&nbsp;
114
+ <a href="#M000075">schema_ref</a>&nbsp;&nbsp;
115
+ <a href="#M000082">unit</a>&nbsp;&nbsp;
114
116
  </div>
115
117
  </div>
116
118
 
@@ -145,12 +147,12 @@ instance page on xbrlware wiki</a> for more details.
145
147
  <div id="methods">
146
148
  <h3 class="section-bar">Public Class methods</h3>
147
149
 
148
- <div id="method-M000075" class="method-detail">
149
- <a name="M000075"></a>
150
+ <div id="method-M000073" class="method-detail">
151
+ <a name="M000073"></a>
150
152
 
151
153
  <div class="method-heading">
152
- <a href="#M000075" class="method-signature">
153
- <span class="method-name">new</span><span class="method-args">(instance_filepath, taxonomy_filepath=nil)</span>
154
+ <a href="#M000073" class="method-signature">
155
+ <span class="method-name">new</span><span class="method-args">(instance_str, taxonomy_filepath=nil)</span>
154
156
  </a>
155
157
  </div>
156
158
 
@@ -159,8 +161,9 @@ instance page on xbrlware wiki</a> for more details.
159
161
  Creates an <a href="Instance.html">Instance</a>.
160
162
  </p>
161
163
  <table>
162
- <tr><td valign="top">instance_filepath:</td><td>XBRL <a href="Instance.html">Instance</a> source. Tries to load and parse
163
- instance file from the path.
164
+ <tr><td valign="top">instance_str:</td><td>XBRL <a href="Instance.html">Instance</a> source. Tries to load and parse
165
+ instance file from the instance_str. This can be XBRL instance file from
166
+ the file system or XBRL content string.
164
167
 
165
168
  </td></tr>
166
169
  <tr><td valign="top">taxonomy_filepath:</td><td>optional parameter, XBRL <a href="Taxonomy.html">Taxonomy</a> source. Tries
@@ -172,33 +175,40 @@ taxonomy file in the instance document will be ignored
172
175
  <p>
173
176
  Expects instance source is well-formatted and valid Sometimes instance
174
177
  document contains large chunk of HTML content with <a
175
- href="Instance.html#M000075">new</a> lines in-between, which will cause
178
+ href="Instance.html#M000073">new</a> lines in-between, which will cause
176
179
  parsing error. Hence any exceptions during instance source parsing, will
177
180
  trigger re-parsing of the entire instnace file with <a
178
- href="Instance.html#M000075">new</a> lines replaced. Look at <a
181
+ href="Instance.html#M000073">new</a> lines replaced. Look at <a
179
182
  href="http://code.google.com/p/xbrlware/wiki/InstanceTaxonomy">delaing with
180
183
  instance page on xbrlware wiki</a> for details.
181
184
  </p>
182
185
  <p><a class="source-toggle" href="#"
183
- onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
184
- <div class="method-source-code" id="M000075-source">
186
+ onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
187
+ <div class="method-source-code" id="M000073-source">
185
188
  <pre>
186
189
  <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 42</span>
187
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">instance_filepath</span>, <span class="ruby-identifier">taxonomy_filepath</span>=<span class="ruby-keyword kw">nil</span>)
190
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">instance_str</span>, <span class="ruby-identifier">taxonomy_filepath</span>=<span class="ruby-keyword kw">nil</span>)
188
191
  <span class="ruby-identifier">m</span>=<span class="ruby-constant">Benchmark</span>.<span class="ruby-identifier">measure</span> <span class="ruby-keyword kw">do</span>
189
192
  <span class="ruby-keyword kw">begin</span>
190
- <span class="ruby-ivar">@file_name</span>=<span class="ruby-identifier">instance_filepath</span>
191
- <span class="ruby-ivar">@xbrl_content</span> = <span class="ruby-constant">XmlParser</span>.<span class="ruby-identifier">xml_in</span>(<span class="ruby-identifier">instance_filepath</span>, {<span class="ruby-value str">'ForceContent'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>})
193
+ <span class="ruby-ivar">@file_name</span>=<span class="ruby-identifier">instance_str</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">instance_str</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/&lt;.*?&gt;/</span><span class="ruby-identifier">m</span>
194
+ <span class="ruby-ivar">@xbrl_content</span> = <span class="ruby-constant">XmlParser</span>.<span class="ruby-identifier">xml_in</span>(<span class="ruby-identifier">instance_str</span>, {<span class="ruby-value str">'ForceContent'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>})
192
195
  <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span>
193
- <span class="ruby-identifier">$LOG</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;File [&quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">instance_filepath</span><span class="ruby-operator">+</span><span class="ruby-value str">&quot;] is not well formed. Starting reparsing after removing new lines.&quot;</span>
194
- <span class="ruby-ivar">@xbrl_content</span> = <span class="ruby-constant">XmlParser</span>.<span class="ruby-identifier">xml_in</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">instance_filepath</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\n&quot;</span>, <span class="ruby-value str">&quot;&quot;</span>), {<span class="ruby-value str">'ForceContent'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>})
196
+ <span class="ruby-identifier">new_content</span>=<span class="ruby-keyword kw">nil</span>
197
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">instance_str</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/&lt;.*?&gt;/</span><span class="ruby-identifier">m</span>
198
+ <span class="ruby-identifier">$LOG</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;Supplied XBRL content is not well formed. Starting reparsing after removing new lines.&quot;</span>
199
+ <span class="ruby-identifier">new_content</span>=<span class="ruby-identifier">instance_str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\n&quot;</span>, <span class="ruby-value str">&quot;&quot;</span>)
200
+ <span class="ruby-keyword kw">else</span>
201
+ <span class="ruby-identifier">$LOG</span>.<span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;File [&quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">instance_str</span><span class="ruby-operator">+</span><span class="ruby-value str">&quot;] is not well formed. Starting reparsing after removing new lines.&quot;</span>
202
+ <span class="ruby-identifier">new_content</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">instance_str</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\n&quot;</span>, <span class="ruby-value str">&quot;&quot;</span>)
203
+ <span class="ruby-keyword kw">end</span>
204
+ <span class="ruby-ivar">@xbrl_content</span> = <span class="ruby-constant">XmlParser</span>.<span class="ruby-identifier">xml_in</span>(<span class="ruby-identifier">new_content</span>, {<span class="ruby-value str">'ForceContent'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>}) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">new_content</span>.<span class="ruby-identifier">nil?</span>
195
205
  <span class="ruby-keyword kw">end</span>
196
206
  <span class="ruby-keyword kw">end</span>
197
- <span class="ruby-identifier">bm</span>(<span class="ruby-value str">&quot;Parsing [&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">instance_filepath</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;] took&quot;</span>, <span class="ruby-identifier">m</span>)
207
+ <span class="ruby-identifier">bm</span>(<span class="ruby-value str">&quot;Parsing [&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">instance_str</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;] took&quot;</span>, <span class="ruby-identifier">m</span>)
198
208
 
199
209
  <span class="ruby-comment cmt"># if taxonomy file is not supplied, get it from instance schema_ref</span>
200
210
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">taxonomy_filepath</span>.<span class="ruby-identifier">nil?</span>
201
- <span class="ruby-identifier">taxonomy_file_location</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">instance_filepath</span>)<span class="ruby-operator">+</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">Separator</span><span class="ruby-operator">+</span><span class="ruby-identifier">schema_ref</span>
211
+ <span class="ruby-identifier">taxonomy_file_location</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">instance_str</span>)<span class="ruby-operator">+</span><span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">Separator</span><span class="ruby-operator">+</span><span class="ruby-identifier">schema_ref</span>
202
212
  <span class="ruby-identifier">taxonomy_filepath</span> = <span class="ruby-identifier">taxonomy_file_location</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">taxonomy_file_location</span>) <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-keyword kw">not</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">taxonomy_file_location</span>))
203
213
  <span class="ruby-keyword kw">end</span>
204
214
 
@@ -212,11 +222,11 @@ instance page on xbrlware wiki</a> for details.
212
222
 
213
223
  <h3 class="section-bar">Public Instance methods</h3>
214
224
 
215
- <div id="method-M000078" class="method-detail">
216
- <a name="M000078"></a>
225
+ <div id="method-M000076" class="method-detail">
226
+ <a name="M000076"></a>
217
227
 
218
228
  <div class="method-heading">
219
- <a href="#M000078" class="method-signature">
229
+ <a href="#M000076" class="method-signature">
220
230
  <span class="method-name">context</span><span class="method-args">(context_id=nil, dimensions=[])</span>
221
231
  </a>
222
232
  </div>
@@ -231,10 +241,10 @@ Takes optional context_id as string and dimensions as array
231
241
  Returns nil if context_id or dimensions is passed and no matching context exist
232
242
  </pre>
233
243
  <p><a class="source-toggle" href="#"
234
- onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
235
- <div class="method-source-code" id="M000078-source">
244
+ onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
245
+ <div class="method-source-code" id="M000076-source">
236
246
  <pre>
237
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 81</span>
247
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 88</span>
238
248
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">context</span>(<span class="ruby-identifier">context_id</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">dimensions</span>=[])
239
249
  <span class="ruby-identifier">all_contexts</span>= <span class="ruby-identifier">context_by_id</span>(<span class="ruby-identifier">context_id</span>)
240
250
 
@@ -277,7 +287,7 @@ Takes <a href="Instance.html#M000085">item</a> name
277
287
  onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
278
288
  <div class="method-source-code" id="M000086-source">
279
289
  <pre>
280
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 313</span>
290
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 350</span>
281
291
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">context_for_item</span>(<span class="ruby-identifier">item_name</span>)
282
292
  <span class="ruby-identifier">contexts</span>=[]
283
293
  <span class="ruby-identifier">items</span> = <span class="ruby-identifier">item</span>(<span class="ruby-identifier">item_name</span>)
@@ -289,11 +299,11 @@ Takes <a href="Instance.html#M000085">item</a> name
289
299
  </div>
290
300
  </div>
291
301
 
292
- <div id="method-M000079" class="method-detail">
293
- <a name="M000079"></a>
302
+ <div id="method-M000077" class="method-detail">
303
+ <a name="M000077"></a>
294
304
 
295
305
  <div class="method-heading">
296
- <a href="#M000079" class="method-signature">
306
+ <a href="#M000077" class="method-signature">
297
307
  <span class="method-name">ctx_groupby_dim</span><span class="method-args">()</span>
298
308
  </a>
299
309
  </div>
@@ -304,10 +314,10 @@ Returns contexts grouped by dimension as map. Map contains dimension as key
304
314
  and corresponding contexts as value
305
315
  </p>
306
316
  <p><a class="source-toggle" href="#"
307
- onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
308
- <div class="method-source-code" id="M000079-source">
317
+ onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
318
+ <div class="method-source-code" id="M000077-source">
309
319
  <pre>
310
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 99</span>
320
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 106</span>
311
321
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ctx_groupby_dim</span>
312
322
  <span class="ruby-identifier">dim_group</span>={}
313
323
  <span class="ruby-identifier">all_contexts</span>= <span class="ruby-identifier">context</span>
@@ -325,11 +335,11 @@ and corresponding contexts as value
325
335
  </div>
326
336
  </div>
327
337
 
328
- <div id="method-M000082" class="method-detail">
329
- <a name="M000082"></a>
338
+ <div id="method-M000080" class="method-detail">
339
+ <a name="M000080"></a>
330
340
 
331
341
  <div class="method-heading">
332
- <a href="#M000082" class="method-signature">
342
+ <a href="#M000080" class="method-signature">
333
343
  <span class="method-name">ctx_groupby_dim_dom_print</span><span class="method-args">()</span>
334
344
  </a>
335
345
  </div>
@@ -337,14 +347,14 @@ and corresponding contexts as value
337
347
  <div class="method-description">
338
348
  <p>
339
349
  Prints dimension -&gt; domain -&gt; <a
340
- href="Instance.html#M000078">context</a> relationship for all contexts in
350
+ href="Instance.html#M000076">context</a> relationship for all contexts in
341
351
  the console.
342
352
  </p>
343
353
  <p><a class="source-toggle" href="#"
344
- onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
345
- <div class="method-source-code" id="M000082-source">
354
+ onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
355
+ <div class="method-source-code" id="M000080-source">
346
356
  <pre>
347
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 141</span>
357
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 148</span>
348
358
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ctx_groupby_dim_dom_print</span>
349
359
  <span class="ruby-identifier">group_dim</span>=<span class="ruby-identifier">ctx_groupby_dim</span>
350
360
  <span class="ruby-identifier">group_dim</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dimension</span><span class="ruby-operator">|</span>
@@ -363,11 +373,11 @@ the console.
363
373
  </div>
364
374
  </div>
365
375
 
366
- <div id="method-M000080" class="method-detail">
367
- <a name="M000080"></a>
376
+ <div id="method-M000078" class="method-detail">
377
+ <a name="M000078"></a>
368
378
 
369
379
  <div class="method-heading">
370
- <a href="#M000080" class="method-signature">
380
+ <a href="#M000078" class="method-signature">
371
381
  <span class="method-name">ctx_groupby_dom</span><span class="method-args">(dimensions=[])</span>
372
382
  </a>
373
383
  </div>
@@ -380,10 +390,10 @@ Takes optional dimensions as array
380
390
  Returns contexts group by domain as map. Map contains domain as key and corresponding contexts as value
381
391
  </pre>
382
392
  <p><a class="source-toggle" href="#"
383
- onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
384
- <div class="method-source-code" id="M000080-source">
393
+ onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
394
+ <div class="method-source-code" id="M000078-source">
385
395
  <pre>
386
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 114</span>
396
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 121</span>
387
397
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ctx_groupby_dom</span>(<span class="ruby-identifier">dimensions</span>=[])
388
398
  <span class="ruby-identifier">dom_group</span>={}
389
399
  <span class="ruby-identifier">all_contexts</span>= <span class="ruby-identifier">context</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">dimensions</span>)
@@ -401,11 +411,11 @@ Takes optional dimensions as array
401
411
  </div>
402
412
  </div>
403
413
 
404
- <div id="method-M000081" class="method-detail">
405
- <a name="M000081"></a>
414
+ <div id="method-M000079" class="method-detail">
415
+ <a name="M000079"></a>
406
416
 
407
417
  <div class="method-heading">
408
- <a href="#M000081" class="method-signature">
418
+ <a href="#M000079" class="method-signature">
409
419
  <span class="method-name">ctx_groupby_period</span><span class="method-args">(dimensions=[])</span>
410
420
  </a>
411
421
  </div>
@@ -418,17 +428,17 @@ Takes optional dimensions as array
418
428
  Returns contexts group by period as map. Map contains period as key and corresponding contexts as value
419
429
  </pre>
420
430
  <p><a class="source-toggle" href="#"
421
- onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
422
- <div class="method-source-code" id="M000081-source">
431
+ onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
432
+ <div class="method-source-code" id="M000079-source">
423
433
  <pre>
424
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 129</span>
434
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 136</span>
425
435
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ctx_groupby_period</span>(<span class="ruby-identifier">dimensions</span>=[])
426
436
  <span class="ruby-identifier">period_group</span>={}
427
437
  <span class="ruby-identifier">all_contexts</span>= <span class="ruby-identifier">context</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">dimensions</span>)
428
438
  <span class="ruby-identifier">all_contexts</span>=[<span class="ruby-identifier">all_contexts</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">all_contexts</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
429
439
  <span class="ruby-identifier">all_contexts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ctx</span><span class="ruby-operator">|</span>
430
- <span class="ruby-identifier">period_group</span>[<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">to_s</span>] = [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">period_group</span>[<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">to_s</span>].<span class="ruby-identifier">nil?</span>
431
- <span class="ruby-identifier">period_group</span>[<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">period</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ctx</span>
440
+ <span class="ruby-identifier">period_group</span>[<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">period</span>] = [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">period_group</span>[<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">period</span>].<span class="ruby-identifier">nil?</span>
441
+ <span class="ruby-identifier">period_group</span>[<span class="ruby-identifier">ctx</span>.<span class="ruby-identifier">period</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">ctx</span>
432
442
  <span class="ruby-keyword kw">end</span>
433
443
  <span class="ruby-identifier">period_group</span>
434
444
  <span class="ruby-keyword kw">end</span>
@@ -451,7 +461,7 @@ Takes optional dimensions as array
451
461
  onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
452
462
  <div class="method-source-code" id="M000090-source">
453
463
  <pre>
454
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 356</span>
464
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 393</span>
455
465
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entity_details</span>
456
466
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@entity_details</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>
457
467
  <span class="ruby-keyword kw">begin</span>
@@ -474,11 +484,13 @@ Takes optional dimensions as array
474
484
  <span class="ruby-ivar">@entity_details</span>[<span class="ruby-value str">&quot;fiscal_end_date&quot;</span>]=<span class="ruby-identifier">e_fiscal_end_date</span>.<span class="ruby-identifier">value</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">e_fiscal_end_date</span>.<span class="ruby-identifier">nil?</span>
475
485
  <span class="ruby-ivar">@entity_details</span>[<span class="ruby-value str">&quot;common_shares_outstanding&quot;</span>]=<span class="ruby-identifier">e_common_shares_outstanding</span>.<span class="ruby-identifier">value</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">e_common_shares_outstanding</span>.<span class="ruby-identifier">nil?</span>
476
486
 
477
- <span class="ruby-identifier">file_name</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@file_name</span>)
478
- <span class="ruby-identifier">symbol</span>=<span class="ruby-identifier">file_name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;-&quot;</span>)[<span class="ruby-value">0</span>]
479
- <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">upcase!</span>
487
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@file_name</span>.<span class="ruby-identifier">nil?</span>
488
+ <span class="ruby-identifier">file_name</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-ivar">@file_name</span>)
489
+ <span class="ruby-identifier">symbol</span>=<span class="ruby-identifier">file_name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;-&quot;</span>)[<span class="ruby-value">0</span>]
490
+ <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">upcase!</span>
480
491
 
481
- <span class="ruby-ivar">@entity_details</span>[<span class="ruby-value str">&quot;symbol&quot;</span>]=<span class="ruby-identifier">symbol</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">nil?</span>
492
+ <span class="ruby-ivar">@entity_details</span>[<span class="ruby-value str">&quot;symbol&quot;</span>]=<span class="ruby-identifier">symbol</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">nil?</span>
493
+ <span class="ruby-keyword kw">end</span>
482
494
  <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
483
495
  <span class="ruby-ivar">@entity_details</span>
484
496
  <span class="ruby-keyword kw">end</span>
@@ -504,7 +516,7 @@ Takes optional dimensions as array
504
516
  onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
505
517
  <div class="method-source-code" id="M000089-source">
506
518
  <pre>
507
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 352</span>
519
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 389</span>
508
520
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entity_details=</span>(<span class="ruby-identifier">value</span>)
509
521
  <span class="ruby-ivar">@entity_details</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">value</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
510
522
  <span class="ruby-keyword kw">end</span>
@@ -538,7 +550,7 @@ Takes optional <a href="Instance.html#M000085">item</a> id and language
538
550
  onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
539
551
  <div class="method-source-code" id="M000088-source">
540
552
  <pre>
541
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 342</span>
553
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 379</span>
542
554
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">footnotes</span> (<span class="ruby-identifier">item_id</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">lang</span>=<span class="ruby-keyword kw">nil</span>)
543
555
  <span class="ruby-ivar">@item_footnote_map</span>=<span class="ruby-keyword kw">nil</span>
544
556
  <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot; lang can't be passed when item id is nil&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">item_id</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-keyword kw">not</span> <span class="ruby-identifier">lang</span>.<span class="ruby-identifier">nil?</span>)
@@ -553,6 +565,29 @@ Takes optional <a href="Instance.html#M000085">item</a> id and language
553
565
  </div>
554
566
  </div>
555
567
 
568
+ <div id="method-M000081" class="method-detail">
569
+ <a name="M000081"></a>
570
+
571
+ <div class="method-heading">
572
+ <a href="#M000081" class="method-signature">
573
+ <span class="method-name">inspect</span><span class="method-args">()</span>
574
+ </a>
575
+ </div>
576
+
577
+ <div class="method-description">
578
+ <p><a class="source-toggle" href="#"
579
+ onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
580
+ <div class="method-source-code" id="M000081-source">
581
+ <pre>
582
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 162</span>
583
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
584
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_s</span>
585
+ <span class="ruby-keyword kw">end</span>
586
+ </pre>
587
+ </div>
588
+ </div>
589
+ </div>
590
+
556
591
  <div id="method-M000085" class="method-detail">
557
592
  <a name="M000085"></a>
558
593
 
@@ -574,12 +609,12 @@ Takes name and optional context_ref and unit_ref
574
609
  onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
575
610
  <div class="method-source-code" id="M000085-source">
576
611
  <pre>
577
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 291</span>
612
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 328</span>
578
613
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">item</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">context_ref</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">unit_ref</span>=<span class="ruby-keyword kw">nil</span>)
579
614
 
580
615
  <span class="ruby-identifier">item_content</span> = <span class="ruby-ivar">@xbrl_content</span>[<span class="ruby-identifier">name</span>]
581
616
 
582
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">item_content</span>.<span class="ruby-identifier">nil?</span>
617
+ <span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">item_content</span>.<span class="ruby-identifier">nil?</span>
583
618
 
584
619
  <span class="ruby-identifier">items</span>=[]
585
620
 
@@ -598,6 +633,42 @@ Takes name and optional context_ref and unit_ref
598
633
  </div>
599
634
  </div>
600
635
 
636
+ <div id="method-M000083" class="method-detail">
637
+ <a name="M000083"></a>
638
+
639
+ <div class="method-heading">
640
+ <a href="#M000083" class="method-signature">
641
+ <span class="method-name">item_all</span><span class="method-args">()</span>
642
+ </a>
643
+ </div>
644
+
645
+ <div class="method-description">
646
+ <p><a class="source-toggle" href="#"
647
+ onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
648
+ <div class="method-source-code" id="M000083-source">
649
+ <pre>
650
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 294</span>
651
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">item_all</span>
652
+
653
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@item_all</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@item_all</span>.<span class="ruby-identifier">nil?</span>
654
+
655
+ <span class="ruby-identifier">all_items</span> = <span class="ruby-ivar">@xbrl_content</span>
656
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">all_items</span>.<span class="ruby-identifier">nil?</span>
657
+
658
+ <span class="ruby-ivar">@item_all</span>=[]
659
+
660
+ <span class="ruby-identifier">all_items</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">item_content</span><span class="ruby-operator">|</span>
661
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">item_content</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
662
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">item_content</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">item_content</span>[<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;contextRef&quot;</span>].<span class="ruby-identifier">nil?</span>
663
+ <span class="ruby-ivar">@item_all</span> = <span class="ruby-ivar">@item_all</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">item</span>(<span class="ruby-identifier">name</span>)
664
+ <span class="ruby-keyword kw">end</span>
665
+ <span class="ruby-ivar">@item_all</span>
666
+ <span class="ruby-keyword kw">end</span>
667
+ </pre>
668
+ </div>
669
+ </div>
670
+ </div>
671
+
601
672
  <div id="method-M000084" class="method-detail">
602
673
  <a name="M000084"></a>
603
674
 
@@ -612,17 +683,17 @@ Takes name and optional context_ref and unit_ref
612
683
  onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
613
684
  <div class="method-source-code" id="M000084-source">
614
685
  <pre>
615
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 274</span>
686
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 311</span>
616
687
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">item_all_map</span>
617
- <span class="ruby-identifier">all_items</span> = <span class="ruby-ivar">@xbrl_content</span>
618
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">all_items</span>.<span class="ruby-identifier">nil?</span>
688
+ <span class="ruby-identifier">items</span>=<span class="ruby-identifier">item_all</span>
689
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">items</span>.<span class="ruby-identifier">nil?</span>
619
690
 
620
691
  <span class="ruby-identifier">items_hash</span>={}
621
692
 
622
- <span class="ruby-identifier">all_items</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">item_content</span><span class="ruby-operator">|</span>
623
- <span class="ruby-identifier">_name</span>=<span class="ruby-identifier">name</span>.<span class="ruby-identifier">upcase</span>
624
- <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_name</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;CONTEXT&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">_name</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;UNIT&quot;</span>
625
- <span class="ruby-identifier">items_hash</span>[<span class="ruby-identifier">name</span>.<span class="ruby-identifier">upcase</span>] = <span class="ruby-identifier">item</span>(<span class="ruby-identifier">name</span>)
693
+ <span class="ruby-identifier">items</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
694
+ <span class="ruby-identifier">_name</span>= <span class="ruby-identifier">item</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">upcase</span>
695
+ <span class="ruby-identifier">items_hash</span>[<span class="ruby-identifier">_name</span>] = [] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">items_hash</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">_name</span>)
696
+ <span class="ruby-identifier">items_hash</span>[<span class="ruby-identifier">_name</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">item</span>
626
697
  <span class="ruby-keyword kw">end</span>
627
698
  <span class="ruby-identifier">items_hash</span>
628
699
  <span class="ruby-keyword kw">end</span>
@@ -652,7 +723,7 @@ Takes <a href="Instance.html#M000085">item</a> name and filter block
652
723
  onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
653
724
  <div class="method-source-code" id="M000087-source">
654
725
  <pre>
655
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 324</span>
726
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 361</span>
656
727
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">item_ctx_filter</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">context_filter_block</span>)
657
728
  <span class="ruby-identifier">items</span>=<span class="ruby-identifier">item</span>(<span class="ruby-identifier">name</span>)
658
729
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">items</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">context_filter_block</span>.<span class="ruby-identifier">nil?</span>
@@ -667,25 +738,25 @@ Takes <a href="Instance.html#M000085">item</a> name and filter block
667
738
  </div>
668
739
  </div>
669
740
 
670
- <div id="method-M000076" class="method-detail">
671
- <a name="M000076"></a>
741
+ <div id="method-M000074" class="method-detail">
742
+ <a name="M000074"></a>
672
743
 
673
744
  <div class="method-heading">
674
- <a href="#M000076" class="method-signature">
745
+ <a href="#M000074" class="method-signature">
675
746
  <span class="method-name">raw</span><span class="method-args">()</span>
676
747
  </a>
677
748
  </div>
678
749
 
679
750
  <div class="method-description">
680
751
  <p>
681
- Returns <a href="Instance.html#M000076">raw</a> content of instance file in
752
+ Returns <a href="Instance.html#M000074">raw</a> content of instance file in
682
753
  the form of Hash
683
754
  </p>
684
755
  <p><a class="source-toggle" href="#"
685
- onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
686
- <div class="method-source-code" id="M000076-source">
756
+ onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
757
+ <div class="method-source-code" id="M000074-source">
687
758
  <pre>
688
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 65</span>
759
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 72</span>
689
760
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">raw</span>
690
761
  <span class="ruby-ivar">@xbrl_content</span>
691
762
  <span class="ruby-keyword kw">end</span>
@@ -694,11 +765,11 @@ the form of Hash
694
765
  </div>
695
766
  </div>
696
767
 
697
- <div id="method-M000077" class="method-detail">
698
- <a name="M000077"></a>
768
+ <div id="method-M000075" class="method-detail">
769
+ <a name="M000075"></a>
699
770
 
700
771
  <div class="method-heading">
701
- <a href="#M000077" class="method-signature">
772
+ <a href="#M000075" class="method-signature">
702
773
  <span class="method-name">schema_ref</span><span class="method-args">()</span>
703
774
  </a>
704
775
  </div>
@@ -709,10 +780,10 @@ Returns schemaRef element of instance file. schemaRef holds path to
709
780
  taxonomy file for the instance file.
710
781
  </p>
711
782
  <p><a class="source-toggle" href="#"
712
- onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
713
- <div class="method-source-code" id="M000077-source">
783
+ onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
784
+ <div class="method-source-code" id="M000075-source">
714
785
  <pre>
715
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 70</span>
786
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 77</span>
716
787
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">schema_ref</span>
717
788
  <span class="ruby-identifier">base</span> = <span class="ruby-ivar">@xbrl_content</span>[<span class="ruby-value str">&quot;schemaRef&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;xml:base&quot;</span>]
718
789
  <span class="ruby-identifier">href</span> = <span class="ruby-ivar">@xbrl_content</span>[<span class="ruby-value str">&quot;schemaRef&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;xlink:href&quot;</span>]
@@ -724,11 +795,11 @@ taxonomy file for the instance file.
724
795
  </div>
725
796
  </div>
726
797
 
727
- <div id="method-M000083" class="method-detail">
728
- <a name="M000083"></a>
798
+ <div id="method-M000082" class="method-detail">
799
+ <a name="M000082"></a>
729
800
 
730
801
  <div class="method-heading">
731
- <a href="#M000083" class="method-signature">
802
+ <a href="#M000082" class="method-signature">
732
803
  <span class="method-name">unit</span><span class="method-args">(unit_id=nil)</span>
733
804
  </a>
734
805
  </div>
@@ -743,10 +814,10 @@ Takes optional unit_id
743
814
  Returns nil if unit_id is given and no matching unit found
744
815
  </pre>
745
816
  <p><a class="source-toggle" href="#"
746
- onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
747
- <div class="method-source-code" id="M000083-source">
817
+ onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
818
+ <div class="method-source-code" id="M000082-source">
748
819
  <pre>
749
- <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 229</span>
820
+ <span class="ruby-comment cmt"># File lib/xbrlware/instance.rb, line 243</span>
750
821
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unit</span>(<span class="ruby-identifier">unit_id</span>=<span class="ruby-keyword kw">nil</span>)
751
822
  <span class="ruby-identifier">unit_content</span> = <span class="ruby-ivar">@xbrl_content</span>[<span class="ruby-value str">&quot;unit&quot;</span>]
752
823
  <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">unit_content</span>.<span class="ruby-identifier">nil?</span>
@@ -758,8 +829,9 @@ Takes optional unit_id
758
829
 
759
830
  <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">unit_id</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;id&quot;</span>].<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">unit_id</span>
760
831
 
832
+ <span class="ruby-identifier">_unit</span>=<span class="ruby-keyword kw">nil</span>
761
833
  <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;measure&quot;</span>].<span class="ruby-identifier">nil?</span>
762
- <span class="ruby-identifier">units</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Unit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;id&quot;</span>], <span class="ruby-identifier">l</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;measure&quot;</span>]))
834
+ <span class="ruby-identifier">_unit</span> = <span class="ruby-constant">Unit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;id&quot;</span>], <span class="ruby-identifier">l</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;measure&quot;</span>]))
763
835
  <span class="ruby-keyword kw">else</span>
764
836
  <span class="ruby-identifier">divide_content</span> = <span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;divide&quot;</span>][<span class="ruby-value">0</span>]
765
837
 
@@ -767,8 +839,11 @@ Takes optional unit_id
767
839
  <span class="ruby-identifier">denominator</span> = <span class="ruby-identifier">l</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">divide_content</span>[<span class="ruby-value str">&quot;unitDenominator&quot;</span>][<span class="ruby-value">0</span>][<span class="ruby-value str">&quot;measure&quot;</span>])
768
840
 
769
841
  <span class="ruby-identifier">divide</span>=<span class="ruby-constant">Unit</span><span class="ruby-operator">::</span><span class="ruby-constant">Divide</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">numerator</span>, <span class="ruby-identifier">denominator</span>)
770
- <span class="ruby-identifier">units</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Unit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;id&quot;</span>], <span class="ruby-identifier">divide</span>)
842
+ <span class="ruby-identifier">_unit</span> = <span class="ruby-constant">Unit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;id&quot;</span>], <span class="ruby-identifier">divide</span>)
771
843
  <span class="ruby-keyword kw">end</span>
844
+ <span class="ruby-identifier">_unit</span>.<span class="ruby-identifier">ns</span>=<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;nspace&quot;</span>]
845
+ <span class="ruby-identifier">_unit</span>.<span class="ruby-identifier">nsp</span>=<span class="ruby-identifier">unit</span>[<span class="ruby-value str">&quot;nspace_prefix&quot;</span>]
846
+ <span class="ruby-identifier">units</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">_unit</span>
772
847
  <span class="ruby-keyword kw">end</span>
773
848
  <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">units</span>[<span class="ruby-value">0</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">unit_id</span>.<span class="ruby-identifier">nil?</span>
774
849
  <span class="ruby-identifier">units</span>