doc/Box/File.html in box-api-0.2.0 vs doc/Box/File.html in box-api-0.2.1
- old
+ new
@@ -311,11 +311,11 @@
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Item.html" title="Box::Item (class)">Item</a></span></h3>
- <p class="inherited"><span class='object_link'><a href="Item.html#copy-instance_method" title="Box::Item#copy (method)">#copy</a></span>, <span class='object_link'><a href="Item.html#delete-instance_method" title="Box::Item#delete (method)">#delete</a></span>, <span class='object_link'><a href="Item.html#force_cached_info-instance_method" title="Box::Item#force_cached_info (method)">#force_cached_info</a></span>, <span class='object_link'><a href="Item.html#id-instance_method" title="Box::Item#id (method)">#id</a></span>, <span class='object_link'><a href="Item.html#info-instance_method" title="Box::Item#info (method)">#info</a></span>, <span class='object_link'><a href="Item.html#initialize-instance_method" title="Box::Item#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Item.html#method_missing-instance_method" title="Box::Item#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Item.html#move-instance_method" title="Box::Item#move (method)">#move</a></span>, <span class='object_link'><a href="Item.html#path-instance_method" title="Box::Item#path (method)">#path</a></span>, <span class='object_link'><a href="Item.html#rename-instance_method" title="Box::Item#rename (method)">#rename</a></span>, <span class='object_link'><a href="Item.html#respond_to%3F-instance_method" title="Box::Item#respond_to? (method)">#respond_to?</a></span>, <span class='object_link'><a href="Item.html#set_description-instance_method" title="Box::Item#set_description (method)">#set_description</a></span>, <span class='object_link'><a href="Item.html#type-instance_method" title="Box::Item#type (method)">#type</a></span>, <span class='object_link'><a href="Item.html#types-class_method" title="Box::Item.types (method)">types</a></span>, <span class='object_link'><a href="Item.html#types-instance_method" title="Box::Item#types (method)">#types</a></span></p>
+ <p class="inherited"><span class='object_link'><a href="Item.html#copy-instance_method" title="Box::Item#copy (method)">#copy</a></span>, <span class='object_link'><a href="Item.html#delete-instance_method" title="Box::Item#delete (method)">#delete</a></span>, <span class='object_link'><a href="Item.html#force_cached_info-instance_method" title="Box::Item#force_cached_info (method)">#force_cached_info</a></span>, <span class='object_link'><a href="Item.html#id-instance_method" title="Box::Item#id (method)">#id</a></span>, <span class='object_link'><a href="Item.html#info-instance_method" title="Box::Item#info (method)">#info</a></span>, <span class='object_link'><a href="Item.html#initialize-instance_method" title="Box::Item#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Item.html#method_missing-instance_method" title="Box::Item#method_missing (method)">#method_missing</a></span>, <span class='object_link'><a href="Item.html#move-instance_method" title="Box::Item#move (method)">#move</a></span>, <span class='object_link'><a href="Item.html#path-instance_method" title="Box::Item#path (method)">#path</a></span>, <span class='object_link'><a href="Item.html#rename-instance_method" title="Box::Item#rename (method)">#rename</a></span>, <span class='object_link'><a href="Item.html#respond_to%3F-instance_method" title="Box::Item#respond_to? (method)">#respond_to?</a></span>, <span class='object_link'><a href="Item.html#set_description-instance_method" title="Box::Item#set_description (method)">#set_description</a></span>, <span class='object_link'><a href="Item.html#share_private-instance_method" title="Box::Item#share_private (method)">#share_private</a></span>, <span class='object_link'><a href="Item.html#share_public-instance_method" title="Box::Item#share_public (method)">#share_public</a></span>, <span class='object_link'><a href="Item.html#type-instance_method" title="Box::Item#type (method)">#type</a></span>, <span class='object_link'><a href="Item.html#types-instance_method" title="Box::Item#types (method)">#types</a></span>, <span class='object_link'><a href="Item.html#types-class_method" title="Box::Item.types (method)">types</a></span>, <span class='object_link'><a href="Item.html#unshare-instance_method" title="Box::Item#unshare (method)">#unshare</a></span></p>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Item.html#initialize-instance_method" title="Box::Item#initialize (method)">Box::Item</a></span></p>
@@ -523,10 +523,18 @@
</p><div class="docstring">
<div class="discussion">
+ <div class="note notetag">
+ <strong>Note:</strong>
+ <div class='inline'>
+<p>This function will share the file if it is not already shared.</p>
+</div>
+ </div>
+
+
<p>Request the HTML embed code for this file.</p>
</div>
</div>
@@ -578,19 +586,29 @@
<tr>
<td>
<pre class="lines">
-70
71
-72</pre>
+72
+73
+74
+75
+76
+77
+78</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/box/file.rb', line 70</span>
+ <pre class="code"><span class="info file"># File 'lib/box/file.rb', line 71</span>
<span class='kw'>def</span> <span class='id embed_code'>embed_code</span><span class='lparen'>(</span><span class='id options'>options</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id new'>new</span><span class='rparen'>)</span>
- <span class='ivar'>@api</span><span class='period'>.</span><span class='id file_embed'>file_embed</span><span class='lparen'>(</span><span class='id id'>id</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>file_embed_html</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
+ <span class='kw'>begin</span>
+ <span class='ivar'>@api</span><span class='period'>.</span><span class='id file_embed'>file_embed</span><span class='lparen'>(</span><span class='id id'>id</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>file_embed_html</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
+ <span class='kw'>rescue</span> <span class='const'>Api</span><span class='op'>::</span><span class='const'>NotShared</span>
+ <span class='id share_public'>share_public</span>
+ <span class='kw'>retry</span>
+ <span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -834,10 +852,10 @@
</div>
</div>
<div id="footer">
- Generated on Tue Nov 8 15:32:23 2011 by
+ Generated on Wed Nov 9 12:40:36 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.3 (ruby-1.9.3).
</div>
</body>
\ No newline at end of file