| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <title> |
| Class: Selenium::WebDriver::Chrome::Service |
| |
| — Documentation by YARD 0.8.1 |
| |
| </title> |
| |
| <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" /> |
| |
| <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" /> |
| |
| <script type="text/javascript" charset="utf-8"> |
| hasFrames = window.top.frames.main ? true : false; |
| relpath = '../../../'; |
| framesUrl = "../../../frames.html#!" + escape(window.location.href); |
| </script> |
| |
| |
| <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script> |
| |
| <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script> |
| |
| |
| </head> |
| <body> |
| <div id="header"> |
| <div id="menu"> |
| |
| <a href="../../../_index.html">Index (S)</a> » |
| <span class='title'><span class='object_link'><a href="../../../Selenium.html" title="Selenium (module)">Selenium</a></span></span> » <span class='title'><span class='object_link'><a href="../../WebDriver.html" title="Selenium::WebDriver (module)">WebDriver</a></span></span> » <span class='title'><span class='object_link'><a href="../Chrome.html" title="Selenium::WebDriver::Chrome (module)">Chrome</a></span></span> |
| » |
| <span class="title">Service</span> |
| |
| |
| <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> |
| </div> |
| |
| <div id="search"> |
| |
| <a class="full_list_link" id="class_list_link" |
| href="../../../class_list.html"> |
| Class List |
| </a> |
| |
| <a class="full_list_link" id="method_list_link" |
| href="../../../method_list.html"> |
| Method List |
| </a> |
| |
| <a class="full_list_link" id="file_list_link" |
| href="../../../file_list.html"> |
| File List |
| </a> |
| |
| </div> |
| <div class="clear"></div> |
| </div> |
| |
| <iframe id="search_frame"></iframe> |
| |
| <div id="content"><h1>Class: Selenium::WebDriver::Chrome::Service |
| |
| |
| <span class="private note title">Private</span> |
| </h1> |
| |
| <dl class="box"> |
| |
| <dt class="r1">Inherits:</dt> |
| <dd class="r1"> |
| <span class="inheritName">Object</span> |
| |
| <ul class="fullTree"> |
| <li>Object</li> |
| |
| <li class="next">Selenium::WebDriver::Chrome::Service</li> |
| |
| </ul> |
| <a href="#" class="inheritanceTree">show all</a> |
| |
| </dd> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <dt class="r2 last">Defined in:</dt> |
| <dd class="r2 last">rb/lib/selenium/webdriver/chrome/service.rb</dd> |
| |
| </dl> |
| <div class="clear"></div> |
| |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This class is part of a private API.</strong> |
| You should avoid using this class if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| <h2>Constant Summary</h2> |
| |
| <dl class="constants"> |
| |
| <dt id="START_TIMEOUT-constant" class="">START_TIMEOUT = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='int'>20</span></pre></dd> |
| |
| <dt id="STOP_TIMEOUT-constant" class="">STOP_TIMEOUT = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='int'>5</span></pre></dd> |
| |
| <dt id="DEFAULT_PORT-constant" class="">DEFAULT_PORT = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='int'>9515</span></pre></dd> |
| |
| <dt id="MISSING_TEXT-constant" class="">MISSING_TEXT = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unable to find the chromedriver executable. Please download the server from http://code.google.com/p/chromedriver/downloads/list and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver.</span><span class='tstring_end'>"</span></span></pre></dd> |
| |
| </dl> |
| |
| |
| |
| |
| |
| <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#uri-instance_method" title="#uri (instance method)">- (Object) <strong>uri</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| <span class="note title readonly">readonly</span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| |
| <h2> |
| Class Method Summary |
| <small>(<a href="#" class="summary_toggle">collapse</a>)</small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#default_service-class_method" title="default_service (class method)">+ (Object) <strong>default_service</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#executable_path-class_method" title="executable_path (class method)">+ (Object) <strong>executable_path</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#executable_path%3D-class_method" title="executable_path= (class method)">+ (Object) <strong>executable_path=</strong>(path) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| <h2> |
| Instance Method Summary |
| <small>(<a href="#" class="summary_toggle">collapse</a>)</small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#initialize-instance_method" title="#initialize (instance method)">- (Service) <strong>initialize</strong>(executable_path, port) </a> |
| |
| |
| |
| </span> |
| |
| |
| <span class="note title constructor">constructor</span> |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>A new instance of Service.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#start-instance_method" title="#start (instance method)">- (Object) <strong>start</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#stop-instance_method" title="#stop (instance method)">- (Object) <strong>stop</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| <div id="constructor_details" class="method_details_list"> |
| <h2>Constructor Details</h2> |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="initialize-instance_method"> |
| |
| - (<tt><span class='object_link'><a href="" title="Selenium::WebDriver::Chrome::Service (class)">Service</a></span></tt>) <strong>initialize</strong>(executable_path, port) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| <p>A new instance of Service</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 36 |
| 37 |
| 38 |
| 39 |
| 40 |
| 41 |
| 42 |
| 43 |
| 44</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 36</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_executable_path'>executable_path</span><span class='comma'>,</span> <span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span> |
| <span class='ivar'>@uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http://</span><span class='embexpr_beg'>#{</span><span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_localhost'>localhost</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_port'>port</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> |
| <span class='id identifier rubyid_server_command'>server_command</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_executable_path'>executable_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>--port=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_port'>port</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> |
| |
| <span class='ivar'>@process</span> <span class='op'>=</span> <span class='const'>ChildProcess</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_server_command'>server_command</span><span class='rparen'>)</span> |
| <span class='ivar'>@socket_poller</span> <span class='op'>=</span> <span class='const'>SocketPoller</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_localhost'>localhost</span><span class='comma'>,</span> <span class='id identifier rubyid_port'>port</span><span class='comma'>,</span> <span class='const'>START_TIMEOUT</span> |
| |
| <span class='ivar'>@process</span><span class='period'>.</span><span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_inherit!'>inherit!</span> <span class='kw'>if</span> <span class='gvar'>$DEBUG</span> <span class='op'>==</span> <span class='kw'>true</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| <div id="instance_attr_details" class="attr_details"> |
| <h2>Instance Attribute Details</h2> |
| |
| |
| <span id=""></span> |
| <span id="uri-instance_method"></span> |
| <div class="method_details first"> |
| <h3 class="signature first" id="uri-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>uri</strong> <span class="extras">(readonly)</span> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 15 |
| 16 |
| 17</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 15</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_uri'>uri</span> |
| <span class='ivar'>@uri</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| |
| <div id="class_method_details" class="method_details_list"> |
| <h2>Class Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="default_service-class_method"> |
| |
| + (<tt>Object</tt>) <strong>default_service</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 32 |
| 33 |
| 34</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 32</span> |
| |
| <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_service'>default_service</span> |
| <span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_executable_path'>executable_path</span><span class='comma'>,</span> <span class='const'>PortProber</span><span class='period'>.</span><span class='id identifier rubyid_above'>above</span><span class='lparen'>(</span><span class='const'>DEFAULT_PORT</span><span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="executable_path-class_method"> |
| |
| + (<tt>Object</tt>) <strong>executable_path</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 17 |
| 18 |
| 19 |
| 20 |
| 21 |
| 22 |
| 23 |
| 24 |
| 25</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 17</span> |
| |
| <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_executable_path'>executable_path</span> |
| <span class='ivar'>@executable_path</span> <span class='op'>||=</span> <span class='lparen'>(</span> |
| <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_find_binary'>find_binary</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>chromedriver</span><span class='tstring_end'>"</span></span> |
| <span class='id identifier rubyid_path'>path</span> <span class='kw'>or</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Error</span><span class='op'>::</span><span class='const'>WebDriverError</span><span class='comma'>,</span> <span class='const'>MISSING_TEXT</span> |
| <span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_assert_executable'>assert_executable</span> <span class='id identifier rubyid_path'>path</span> |
| |
| <span class='id identifier rubyid_path'>path</span> |
| <span class='rparen'>)</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="executable_path=-class_method"> |
| |
| + (<tt>Object</tt>) <strong>executable_path=</strong>(path) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 27 |
| 28 |
| 29 |
| 30</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 27</span> |
| |
| <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_executable_path='>executable_path=</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> |
| <span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_assert_executable'>assert_executable</span> <span class='id identifier rubyid_path'>path</span> |
| <span class='ivar'>@executable_path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| <div id="instance_method_details" class="method_details_list"> |
| <h2>Instance Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="start-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>start</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 46 |
| 47 |
| 48 |
| 49 |
| 50 |
| 51 |
| 52 |
| 53 |
| 54</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 46</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_start'>start</span> |
| <span class='ivar'>@process</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span> |
| |
| <span class='kw'>unless</span> <span class='ivar'>@socket_poller</span><span class='period'>.</span><span class='id identifier rubyid_connected?'>connected?</span> |
| <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Error</span><span class='op'>::</span><span class='const'>WebDriverError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unable to connect to chromedriver </span><span class='embexpr_beg'>#{</span><span class='ivar'>@uri</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> |
| <span class='kw'>end</span> |
| |
| <span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_exit_hook'>exit_hook</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_stop'>stop</span> <span class='rbrace'>}</span> <span class='comment'># make sure we don't leave the server running |
| </span><span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="stop-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>stop</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 56 |
| 57 |
| 58 |
| 59 |
| 60 |
| 61 |
| 62 |
| 63 |
| 64 |
| 65 |
| 66 |
| 67 |
| 68 |
| 69 |
| 70</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/chrome/service.rb', line 56</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span> |
| <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@process</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='ivar'>@process</span><span class='period'>.</span><span class='id identifier rubyid_exited?'>exited?</span> |
| |
| <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_http'>http</span><span class='op'>|</span> |
| <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_open_timeout'>open_timeout</span> <span class='op'>=</span> <span class='const'>STOP_TIMEOUT</span> <span class='op'>/</span> <span class='int'>2</span> |
| <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_read_timeout'>read_timeout</span> <span class='op'>=</span> <span class='const'>STOP_TIMEOUT</span> <span class='op'>/</span> <span class='int'>2</span> |
| |
| <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_head'>head</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/shutdown</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> |
| <span class='kw'>end</span> |
| |
| <span class='ivar'>@process</span><span class='period'>.</span><span class='id identifier rubyid_poll_for_exit'>poll_for_exit</span> <span class='const'>STOP_TIMEOUT</span> |
| <span class='kw'>rescue</span> <span class='const'>ChildProcess</span><span class='op'>::</span><span class='const'>TimeoutError</span> |
| <span class='comment'># ok, force quit |
| </span> <span class='ivar'>@process</span><span class='period'>.</span><span class='id identifier rubyid_stop'>stop</span> <span class='const'>STOP_TIMEOUT</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div id="footer"> |
| Generated on Thu Jul 19 12:32:29 2012 by |
| <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
| 0.8.1 (ruby-1.9.3). |
| </div> |
| |
| </body> |
| </html> |