<!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: HelixSync::ClientService — Documentation by YARD 0.8.7.6 </title> <link rel = "stylesheet" href = "../css/style.css" type = "text/css" charset = "utf-8" /> <link rel = "stylesheet" href = "../css/common.css" type = "text/css" charset = "utf-8" /> <script type = "text/javascript" charset = "utf-8" > hasFrames = window . top . frames . main ? true : false ; relpath = '../' ; framesUrl = "../frames.html#!HelixSync/ClientService.html" ; </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 (C) </a> » <span class = 'title' ><span class = 'object_link' ><a href = "../HelixSync.html" title = "HelixSync (module)" > HelixSync </a></span></span> » <span class = "title" > ClientService </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: HelixSync::ClientService </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" > HelixSync::ClientService </li> </ul> <a href = "#" class = "inheritanceTree" > show all </a> </dd> <dt class = "r2 last" > Defined in: </dt> <dd class = "r2 last" > lib/helix_sync/client_service.rb </dd> </dl> <div class = "clear" ></div> <h2> Overview </h2><div class = "docstring" > <div class = "discussion" > <p> Provides a mechanism for managing client workspaces for projects. </p> </div> </div> <div class = "tags" > </div> <h2> Constant Summary </h2> <dl class = "constants" > <dt id = "handle_create_client-classvariable" class = "" > @@handle_create_client = </dt> <dd><pre class = "code" ><span class = 'lbracket' > [ </span><span class = 'rbracket' > ] </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 = "#env-instance_method" title = "#env (instance method)" > - (Object) <strong> env </strong> </a> </span> <span class = "summary_desc" ><div class = 'inline' > <p> Rack environment. </p> </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 = "#handle_create_client-class_method" title = "handle_create_client (class method)" > + (Object) <strong> handle_create_client </strong> </a> </span> <span class = "summary_desc" ><div class = 'inline' > <p> Callback methods that can implement client workspace creation based on projects. </p> </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 = "#create_client-instance_method" title = "#create_client (instance method)" > - (Object) <strong> create_client </strong> (project, device, root) </a> </span> <span class = "summary_desc" ><div class = 'inline' > <p> Create a client for the project. </p> </div></span> </li> <li class = "public " > <span class = "summary_signature" > <a href = "#initialize-instance_method" title = "#initialize (instance method)" > - (ClientService) <strong> initialize </strong> (env: nil) </a> </span> <span class = "note title constructor" > constructor </span> <span class = "summary_desc" ><div class = 'inline' > <p> A new instance of ClientService. </p> </div></span> </li> <li class = "public " > <span class = "summary_signature" > <a href = "#p4-instance_method" title = "#p4 (instance method)" > - (Object) <strong> p4 </strong> </a> </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 = "HelixSync::ClientService (class)" > ClientService </a></span></tt> ) <strong> initialize </strong> (env: nil) </h3><div class = "docstring" > <div class = "discussion" > <p> Returns a new instance of ClientService </p> </div> </div> <div class = "tags" > </div><table class = "source_code" > <tr> <td> <pre class = "lines" > 8 9 10 </pre> </td> <td> <pre class = "code" ><span class = "info file" > # File 'lib/helix_sync/client_service.rb', line 8 </span> <span class = 'kw' > def </span> <span class = 'id identifier rubyid_initialize' > initialize </span><span class = 'lparen' > ( </span><span class = 'label' > env: </span> <span class = 'kw' > nil </span><span class = 'rparen' > ) </span> <span class = 'ivar' > @env </span> <span class = 'op' > = </span> <span class = 'id identifier rubyid_env' > env </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 = "env=-instance_method" ></span> <div class = "method_details first" > <h3 class = "signature first" id = "env-instance_method" > - ( <tt> Object </tt> ) <strong> env </strong> </h3><div class = "docstring" > <div class = "discussion" > <p> Rack environment </p> </div> </div> <div class = "tags" > </div><table class = "source_code" > <tr> <td> <pre class = "lines" > 6 7 8 </pre> </td> <td> <pre class = "code" ><span class = "info file" > # File 'lib/helix_sync/client_service.rb', line 6 </span> <span class = 'kw' > def </span> <span class = 'id identifier rubyid_env' > env </span> <span class = 'ivar' > @env </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 = "handle_create_client-class_method" > + ( <tt> Object </tt> ) <strong> handle_create_client </strong> </h3><div class = "docstring" > <div class = "discussion" > <p> Callback methods that can implement client workspace creation based on projects. </p> <p> Each callback should take 4 parameters: </p> <ul><li> <p><code> project </code> [String] The project ID. </p> </li><li> <p><code> device </code> [String] A device ID (like a hostname or MAC address) that we'll associate with the client. </p> </li><li> <p><code> root </code> [String] The Root field of the client, the base directory for the new setting. </p> </li><li> <p><code> env </code> [Hash] The rack environment </p> </li></ul> <p> Your callback should return the new client name if it's been handled. </p> <p> It's assumed that your implementation will handle other defaults responsibly. </p> <p> Example: </p> <pre class = "code ruby" ><code class = "ruby" ><span class = 'const' > HelixSync </span><span class = 'op' > :: </span><span class = 'const' > ClientService </span><span class = 'period' > . </span><span class = 'id identifier rubyid_handle_create_client' > handle_create_client </span> <span class = 'op' > << </span> <span class = 'id identifier rubyid_lambda' > lambda </span> <span class = 'kw' > do </span> <span class = 'op' > | </span><span class = 'id identifier rubyid_project' > project </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_device' > device </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_root' > root </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_env' > env </span><span class = 'op' > | </span> <span class = 'id identifier rubyid_client_name' > client_name </span> <span class = 'op' > = </span> <span class = 'id identifier rubyid_go_make_client' > go_make_client </span><span class = 'lparen' > ( </span><span class = 'rparen' > ) </span> <span class = 'kw' > return </span> <span class = 'id identifier rubyid_client_name' > client_name </span> <span class = 'kw' > if </span> <span class = 'id identifier rubyid_client_name' > client_name </span> <span class = 'comment' > # Just return nil if you can't handle it </span><span class = 'kw' > end </span> </code></pre> </div> </div> <div class = "tags" > </div><table class = "source_code" > <tr> <td> <pre class = "lines" > 40 41 42 </pre> </td> <td> <pre class = "code" ><span class = "info file" > # File 'lib/helix_sync/client_service.rb', line 40 </span> <span class = 'kw' > def </span> <span class = 'kw' > self </span><span class = 'period' > . </span><span class = 'id identifier rubyid_handle_create_client' > handle_create_client </span> <span class = 'cvar' > @@handle_create_client </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 = "create_client-instance_method" > - ( <tt> Object </tt> ) <strong> create_client </strong> (project, device, root) </h3><div class = "docstring" > <div class = "discussion" > <p> Create a client for the project. </p> <p> Returns the new client name if successful, nil otherwise. </p> </div> </div> <div class = "tags" > </div><table class = "source_code" > <tr> <td> <pre class = "lines" > 47 48 49 50 51 52 53 54 55 </pre> </td> <td> <pre class = "code" ><span class = "info file" > # File 'lib/helix_sync/client_service.rb', line 47 </span> <span class = 'kw' > def </span> <span class = 'id identifier rubyid_create_client' > create_client </span><span class = 'lparen' > ( </span><span class = 'id identifier rubyid_project' > project </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_device' > device </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_root' > root </span><span class = 'rparen' > ) </span> <span class = 'id identifier rubyid_client_id' > client_id </span> <span class = 'op' > = </span> <span class = 'kw' > nil </span> <span class = 'cvar' > @@handle_create_client </span><span class = 'period' > . </span><span class = 'id identifier rubyid_find' > find </span> <span class = 'kw' > do </span> <span class = 'op' > | </span><span class = 'id identifier rubyid_handler' > handler </span><span class = 'op' > | </span> <span class = 'id identifier rubyid_id' > id </span> <span class = 'op' > = </span> <span class = 'id identifier rubyid_handler' > handler </span><span class = 'period' > . </span><span class = 'id identifier rubyid_call' > call </span><span class = 'lparen' > ( </span><span class = 'id identifier rubyid_project' > project </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_device' > device </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_root' > root </span><span class = 'comma' > , </span> <span class = 'id identifier rubyid_env' > env </span><span class = 'rparen' > ) </span> <span class = 'id identifier rubyid_client_id' > client_id </span> <span class = 'op' > = </span> <span class = 'id identifier rubyid_id' > id </span> <span class = 'kw' > if </span> <span class = 'id identifier rubyid_id' > id </span> <span class = 'id identifier rubyid_id' > id </span> <span class = 'kw' > end </span> <span class = 'id identifier rubyid_client_id' > client_id </span> <span class = 'kw' > end </span></pre> </td> </tr> </table> </div> <div class = "method_details " > <h3 class = "signature " id = "p4-instance_method" > - ( <tt> Object </tt> ) <strong> p4 </strong> </h3><table class = "source_code" > <tr> <td> <pre class = "lines" > 57 58 59 </pre> </td> <td> <pre class = "code" ><span class = "info file" > # File 'lib/helix_sync/client_service.rb', line 57 </span> <span class = 'kw' > def </span> <span class = 'id identifier rubyid_p4' > p4 </span> <span class = 'id identifier rubyid_env' > env </span><span class = 'lbracket' > [ </span><span class = 'tstring' ><span class = 'tstring_beg' > ' </span><span class = 'tstring_content' > p4 </span><span class = 'tstring_end' > ' </span></span><span class = 'rbracket' > ] </span> <span class = 'kw' > end </span></pre> </td> </tr> </table> </div> </div> </div> <div id = "footer" > Generated on Tue Sep 15 01:20:30 2015 by <a href = "http://yardoc.org" title = "Yay! A Ruby Documentation Tool" target = "_parent" > yard </a> 0.8.7.6 (ruby-2.2.3). </div> </body> </html>
#
Change
User
Description
Committed
#1
15741
ptomiak
Branch HWS for my use.
10 years ago