Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.3']
ruby-version: ['4.0.1']

steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 4 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ GEM

PLATFORMS
x86_64-darwin-23
x86_64-darwin-25

DEPENDENCIES
bundler (~> 2.0)
bundler (>= 2.0)
rake (~> 13.0)
rspec (~> 3.0)
solid_callback!
yard
yard (~> 0.9, >= 0)

BUNDLED WITH
2.2.33
4.0.7
6 changes: 3 additions & 3 deletions doc/SolidCallback.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h2>
<dt id="VERSION-constant" class="">VERSION =

</dt>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.0.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>2.0.2</span><span class='tstring_end'>&quot;</span></span></pre></dd>

</dl>

Expand Down Expand Up @@ -243,9 +243,9 @@ <h3 class="signature first" id="included-class_method">
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/SolidCallback/Core.html
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,9 @@ <h3 class="signature " id="wrap_method_with_callbacks-instance_method">
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/SolidCallback/Error.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/SolidCallback/Hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ <h3 class="signature " id="wrap_methods-instance_method">
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/SolidCallback/MethodWrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ <h2>Namespace Listing A-Z</h2>
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
38 changes: 19 additions & 19 deletions doc/file.README.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
</div>

<div id="content"><div id='filecontents'>
<h1 id="label-SolidCallback">SolidCallback</h1>
<h1 id="solidcallback">SolidCallback</h1>

<p><a href="https://badge.fury.io/rb/solid_callback"><img src="https://badge.fury.io/rb/solid_callback.svg"></a> <a href="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml"><img src="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml/badge.svg"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg"></a></p>
<p><a href="https://badge.fury.io/rb/solid_callback"><img src="https://badge.fury.io/rb/solid_callback.svg?icon=si%3Arubygems" alt="Gem Version"></a> <a href="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml"><img src="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml/badge.svg" alt="Test"></a> <a href="https://badge.fury.io/rb/simple_http_service"><img src="https://img.shields.io/gem/dt/simple_http_service.svg" alt="Downloads"></a> <a href="https://github.com/gklsan/solid_callback/network"><img src="https://img.shields.io/github/forks/gklsan/solid_callback.svg" alt="Github forks"></a> <a href="https://github.com/gklsan/solid_callback/stargazers"><img src="https://img.shields.io/github/stars/gklsan/solid_callback.svg" alt="Github stars"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a></p>

<p>SolidCallback adds powerful method interception capabilities to your Ruby classes with near-zero overhead. Clean, flexible, and unobtrusive.</p>

<h2 id="label-Features">Features</h2>
<h2 id="features">Features</h2>
<ul><li>
<p>🔄 <strong>Method Lifecycle Hooks</strong>: <code>before_call</code>, <code>after_call</code>, and <code>around_call</code> - intercept methods without modifying their code</p>
</li><li>
Expand All @@ -79,7 +79,7 @@ <h2 id="label-Features">Features</h2>
<p>📝 <strong>Conditional execution</strong>: Run callbacks only when specific conditions are met</p>
</li></ul>

<h2 id="label-Installation">Installation</h2>
<h2 id="installation">Installation</h2>

<p>Add this line to your application’s Gemfile:</p>

Expand All @@ -96,9 +96,9 @@ <h2 id="label-Installation">Installation</h2>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_solid_callback'>solid_callback</span>
</code></pre>

<h2 id="label-Usage">Usage</h2>
<h2 id="usage">Usage</h2>

<h3 id="label-Basic+Example">Basic Example</h3>
<h3 id="basic-example">Basic Example</h3>

<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>solid_callback</span><span class='tstring_end'>&#39;</span></span>

Expand Down Expand Up @@ -142,7 +142,7 @@ <h3 id="label-Basic+Example">Basic Example</h3>
<span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_find_user'>find_user</span><span class='lparen'>(</span><span class='int'>42</span><span class='rparen'>)</span>
</code></pre>

<h3 id="label-Advanced+Usage">Advanced Usage</h3>
<h3 id="advanced-usage">Advanced Usage</h3>

<p>Apply callbacks to specific methods:</p>

Expand Down Expand Up @@ -190,7 +190,7 @@ <h3 id="label-Advanced+Usage">Advanced Usage</h3>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_before_call'>before_call</span> <span class='symbol'>:notify_admin</span><span class='comma'>,</span> <span class='label'>if:</span> <span class='tlambda'>-&gt;</span> <span class='tlambeg'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_production?'>production?</span> <span class='rbrace'>}</span>
</code></pre>

<h3 id="label-Skipping+Callbacks">Skipping Callbacks</h3>
<h3 id="skipping-callbacks">Skipping Callbacks</h3>

<p>Skip callbacks for specific methods:</p>

Expand All @@ -212,7 +212,7 @@ <h3 id="label-Skipping+Callbacks">Skipping Callbacks</h3>
<span class='kw'>end</span>
</code></pre>

<h2 id="label-Callback+Options">Callback Options</h2>
<h2 id="callback-options">Callback Options</h2>

<p>Each callback method accepts the following options:</p>

Expand All @@ -225,25 +225,25 @@ <h2 id="label-Callback+Options">Callback Options</h2>
</thead>
<tbody>
<tr>
<td>only`</td>
<td><code>only</code></td>
<td>Array of method names to which the callback applies</td>
</tr>
<tr>
<td>except`</td>
<td><code>except</code></td>
<td>Array of method names to which the callback does not apply</td>
</tr>
<tr>
<td>‘if`</td>
<td><code>if</code></td>
<td>Symbol (method name) or Proc that must return true for the callback to run</td>
</tr>
<tr>
<td>unless`</td>
<td><code>unless</code></td>
<td>Symbol (method name) or Proc that must return false for the callback to run</td>
</tr>
</tbody>
</table>

<h2 id="label-How+It+Works">How It Works</h2>
<h2 id="how-it-works">How It Works</h2>

<p>Callbacker uses Ruby’s metaprogramming to wrap your methods with callback functionality:</p>
<ol><li>
Expand All @@ -256,7 +256,7 @@ <h2 id="label-How+It+Works">How It Works</h2>
<p>When the method is called, it executes the callbacks in the proper order</p>
</li></ol>

<h2 id="label-F0-9F-93-9A+Use+Cases">📚 Use Cases</h2>
<h2 id="-use-cases">📚 Use Cases</h2>
<ul><li>
<p>Authentication &amp; Authorization</p>
</li><li>
Expand All @@ -277,19 +277,19 @@ <h2 id="label-F0-9F-93-9A+Use+Cases">📚 Use Cases</h2>
<p>Data transformation</p>
</li></ul>

<h2 id="label-F0-9F-A4-9D+Contributing">🤝 Contributing</h2>
<h2 id="-contributing">🤝 Contributing</h2>

<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/gklsan/solid_callback/issues">github.com/gklsan/solid_callback/issues</a>.</p>

<h2 id="label-F0-9F-93-84+License">📄 License</h2>
<h2 id="-license">📄 License</h2>

<p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
</div></div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
38 changes: 19 additions & 19 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
</div>

<div id="content"><div id='filecontents'>
<h1 id="label-SolidCallback">SolidCallback</h1>
<h1 id="solidcallback">SolidCallback</h1>

<p><a href="https://badge.fury.io/rb/solid_callback"><img src="https://badge.fury.io/rb/solid_callback.svg"></a> <a href="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml"><img src="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml/badge.svg"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg"></a></p>
<p><a href="https://badge.fury.io/rb/solid_callback"><img src="https://badge.fury.io/rb/solid_callback.svg?icon=si%3Arubygems" alt="Gem Version"></a> <a href="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml"><img src="https://github.com/gklsan/solid_callback/actions/workflows/ruby.yml/badge.svg" alt="Test"></a> <a href="https://badge.fury.io/rb/simple_http_service"><img src="https://img.shields.io/gem/dt/simple_http_service.svg" alt="Downloads"></a> <a href="https://github.com/gklsan/solid_callback/network"><img src="https://img.shields.io/github/forks/gklsan/solid_callback.svg" alt="Github forks"></a> <a href="https://github.com/gklsan/solid_callback/stargazers"><img src="https://img.shields.io/github/stars/gklsan/solid_callback.svg" alt="Github stars"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a></p>

<p>SolidCallback adds powerful method interception capabilities to your Ruby classes with near-zero overhead. Clean, flexible, and unobtrusive.</p>

<h2 id="label-Features">Features</h2>
<h2 id="features">Features</h2>
<ul><li>
<p>🔄 <strong>Method Lifecycle Hooks</strong>: <code>before_call</code>, <code>after_call</code>, and <code>around_call</code> - intercept methods without modifying their code</p>
</li><li>
Expand All @@ -79,7 +79,7 @@ <h2 id="label-Features">Features</h2>
<p>📝 <strong>Conditional execution</strong>: Run callbacks only when specific conditions are met</p>
</li></ul>

<h2 id="label-Installation">Installation</h2>
<h2 id="installation">Installation</h2>

<p>Add this line to your application’s Gemfile:</p>

Expand All @@ -96,9 +96,9 @@ <h2 id="label-Installation">Installation</h2>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_solid_callback'>solid_callback</span>
</code></pre>

<h2 id="label-Usage">Usage</h2>
<h2 id="usage">Usage</h2>

<h3 id="label-Basic+Example">Basic Example</h3>
<h3 id="basic-example">Basic Example</h3>

<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>solid_callback</span><span class='tstring_end'>&#39;</span></span>

Expand Down Expand Up @@ -142,7 +142,7 @@ <h3 id="label-Basic+Example">Basic Example</h3>
<span class='id identifier rubyid_service'>service</span><span class='period'>.</span><span class='id identifier rubyid_find_user'>find_user</span><span class='lparen'>(</span><span class='int'>42</span><span class='rparen'>)</span>
</code></pre>

<h3 id="label-Advanced+Usage">Advanced Usage</h3>
<h3 id="advanced-usage">Advanced Usage</h3>

<p>Apply callbacks to specific methods:</p>

Expand Down Expand Up @@ -190,7 +190,7 @@ <h3 id="label-Advanced+Usage">Advanced Usage</h3>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_before_call'>before_call</span> <span class='symbol'>:notify_admin</span><span class='comma'>,</span> <span class='label'>if:</span> <span class='tlambda'>-&gt;</span> <span class='tlambeg'>{</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_production?'>production?</span> <span class='rbrace'>}</span>
</code></pre>

<h3 id="label-Skipping+Callbacks">Skipping Callbacks</h3>
<h3 id="skipping-callbacks">Skipping Callbacks</h3>

<p>Skip callbacks for specific methods:</p>

Expand All @@ -212,7 +212,7 @@ <h3 id="label-Skipping+Callbacks">Skipping Callbacks</h3>
<span class='kw'>end</span>
</code></pre>

<h2 id="label-Callback+Options">Callback Options</h2>
<h2 id="callback-options">Callback Options</h2>

<p>Each callback method accepts the following options:</p>

Expand All @@ -225,25 +225,25 @@ <h2 id="label-Callback+Options">Callback Options</h2>
</thead>
<tbody>
<tr>
<td>only`</td>
<td><code>only</code></td>
<td>Array of method names to which the callback applies</td>
</tr>
<tr>
<td>except`</td>
<td><code>except</code></td>
<td>Array of method names to which the callback does not apply</td>
</tr>
<tr>
<td>‘if`</td>
<td><code>if</code></td>
<td>Symbol (method name) or Proc that must return true for the callback to run</td>
</tr>
<tr>
<td>unless`</td>
<td><code>unless</code></td>
<td>Symbol (method name) or Proc that must return false for the callback to run</td>
</tr>
</tbody>
</table>

<h2 id="label-How+It+Works">How It Works</h2>
<h2 id="how-it-works">How It Works</h2>

<p>Callbacker uses Ruby’s metaprogramming to wrap your methods with callback functionality:</p>
<ol><li>
Expand All @@ -256,7 +256,7 @@ <h2 id="label-How+It+Works">How It Works</h2>
<p>When the method is called, it executes the callbacks in the proper order</p>
</li></ol>

<h2 id="label-F0-9F-93-9A+Use+Cases">📚 Use Cases</h2>
<h2 id="-use-cases">📚 Use Cases</h2>
<ul><li>
<p>Authentication &amp; Authorization</p>
</li><li>
Expand All @@ -277,19 +277,19 @@ <h2 id="label-F0-9F-93-9A+Use+Cases">📚 Use Cases</h2>
<p>Data transformation</p>
</li></ul>

<h2 id="label-F0-9F-A4-9D+Contributing">🤝 Contributing</h2>
<h2 id="-contributing">🤝 Contributing</h2>

<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/gklsan/solid_callback/issues">github.com/gklsan/solid_callback/issues</a>.</p>

<h2 id="label-F0-9F-93-84+License">📄 License</h2>
<h2 id="-license">📄 License</h2>

<p>The gem is available as open source under the terms of the <a href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
</div></div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/top-level-namespace.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ <h2>Defined Under Namespace</h2>
</div>

<div id="footer">
Generated on Wed Mar 12 18:55:58 2025 by
Generated on Tue Mar 3 12:41:11 2026 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.3.0).
0.9.37 (ruby-4.0.1).
</div>

</div>
Expand Down
2 changes: 2 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
ruby = "4"
4 changes: 2 additions & 2 deletions solid_callback.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.description = "SolidCallback adds powerful method interception capabilities to your Ruby classes with near-zero overhead. Clean, flexible, and unobtrusive."
spec.homepage = "https://github.com/gklsan/solid_callback"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.3.0"
spec.required_ruby_version = ">= 4.0.1"

spec.metadata = {
'source_code_uri' => "https://github.com/gklsan/solid_callback",
Expand All @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"

spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "bundler", ">= 2.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "yard", "~> 0.9"
Expand Down