mhenrixon/sidekiq-unique-jobs

View on GitHub
doc/SidekiqUniqueJobs/RedisScript/DSL/ClassMethods.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Module: SidekiqUniqueJobs::RedisScript::DSL::ClassMethods
  
    &mdash; Documentation by YARD 0.9.34
  
</title>

  <link rel="stylesheet" href="../../../css/style.css" type="text/css" />

  <link rel="stylesheet" href="../../../css/common.css" type="text/css" />

<script type="text/javascript">
  pathId = "SidekiqUniqueJobs::RedisScript::DSL::ClassMethods";
  relpath = '../../../';
</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 class="nav_wrap">
      <iframe id="nav" src="../../../class_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../../../_index.html">Index (C)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../../../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../RedisScript.html" title="SidekiqUniqueJobs::RedisScript (module)">RedisScript</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../DSL.html" title="SidekiqUniqueJobs::RedisScript::DSL (module)">DSL</a></span></span>
     &raquo; 
    <span class="title">ClassMethods</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../../../class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><h1>Module: SidekiqUniqueJobs::RedisScript::DSL::ClassMethods
  
  
  
</h1>
<div class="box_info">
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/sidekiq_unique_jobs/redis_script/dsl.rb</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>Module ClassMethods extends the base class with necessary methods</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Author:</p>
<ul class="author">
  
    <li>
      
      
      
      
        
        <div class='inline'><p>Mikael Henriksson <a href="mailto:mikael@zoolutions.se">mikael@zoolutions.se</a></p>
</div>
      
    </li>
  
</ul>

</div>






  
    <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="#config-instance_method" title="#config (instance method)">#<strong>config</strong>  &#x21d2; RedisScript::Config </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The current configuration (See: <span class='object_link'><a href="#configure-instance_method" title="SidekiqUniqueJobs::RedisScript::DSL::ClassMethods#configure (method)">#configure</a></span> on how to configure).</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#configure-instance_method" title="#configure (instance method)">#<strong>configure</strong>(options = {}) { ... } &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Configure the gem.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#execute-instance_method" title="#execute (instance method)">#<strong>execute</strong>(file_name, conn, keys: [], argv: [])  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  



  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="config-instance_method">
  
    #<strong>config</strong>  &#x21d2; <tt><span class='object_link'><a href="../Config.html" title="SidekiqUniqueJobs::RedisScript::Config (class)">RedisScript::Config</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The current configuration (See: <span class='object_link'><a href="#configure-instance_method" title="SidekiqUniqueJobs::RedisScript::DSL::ClassMethods#configure (method)">#configure</a></span> on how to configure)</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../Config.html" title="SidekiqUniqueJobs::RedisScript::Config (class)">RedisScript::Config</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>the gem configuration</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


52
53
54
55
56</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/redis_script/dsl.rb', line 52</span>

<span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
  <span class='const'><span class='object_link'><a href="../DSL.html#MUTEX-constant" title="SidekiqUniqueJobs::RedisScript::DSL::MUTEX (constant)">MUTEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
    <span class='ivar'>@config</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../Config.html" title="SidekiqUniqueJobs::RedisScript::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Config.html#initialize-instance_method" title="SidekiqUniqueJobs::RedisScript::Config#initialize (method)">new</a></span></span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="configure-instance_method">
  
    #<strong>configure</strong>(options = {}) { ... } &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Configure the gem</p>

<p>This is usually called once at startup of an application</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>options</span>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="../../../Hash.html" title="Hash (class)">Hash</a></span></tt>)</span>
      
      
        <em class="default">(defaults to: <tt>{}</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>global gem options</p>
</div>
      
    </li>
  
</ul>

  
    
    
    <p class="tag_title">Options Hash (<tt>options</tt>):</p>
    <ul class="option">
      
        <li>
          <span class="name">:path</span>
          <span class="type">(<tt>String</tt>, <tt>Pathname</tt>)</span>
          <span class="default">
            
          </span>
          
        </li>
      
        <li>
          <span class="name">:logger</span>
          <span class="type">(<tt>Logger</tt>)</span>
          <span class="default">
            
              &mdash; default:
              <tt>default is Logger.new(STDOUT)</tt>
            
          </span>
          
        </li>
      
    </ul>
  

<p class="tag_title">Yields:</p>
<ul class="yield">
  
    <li>
      
      
        <span class='type'></span>
      
      
      
        
        <div class='inline'><p>control to the caller when given block</p>
</div>
      
    </li>
  
</ul>

</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 'lib/sidekiq_unique_jobs/redis_script/dsl.rb', line 36</span>

<span class='kw'>def</span> <span class='id identifier rubyid_configure'>configure</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
    <span class='kw'>yield</span> <span class='id identifier rubyid_config'>config</span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='op'>|</span>
      <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:&quot;#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="execute-instance_method">
  
    #<strong>execute</strong>(file_name, conn, keys: [], argv: [])  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


23
24
25
26
27</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sidekiq_unique_jobs/redis_script/dsl.rb', line 23</span>

<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_conn'>conn</span><span class='comma'>,</span> <span class='label'>keys:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>argv:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
  <span class='const'><span class='object_link'><a href="../../../SidekiqUniqueJobs.html" title="SidekiqUniqueJobs (module)">SidekiqUniqueJobs</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../RedisScript.html" title="SidekiqUniqueJobs::RedisScript (module)">RedisScript</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Client.html" title="SidekiqUniqueJobs::RedisScript::Client (class)">Client</a></span></span>
    <span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
    <span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='id identifier rubyid_conn'>conn</span><span class='comma'>,</span> <span class='label'>keys:</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='label'>argv:</span> <span class='id identifier rubyid_argv'>argv</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Wed Jan 24 10:57:23 2024 by
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.34 (ruby-3.3.0).
</div>

    </div>
  </body>
</html>