Socket
Book a DemoInstallSign in
Socket

forwarder3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forwarder3

0.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Forwarder3

This implementation is for, and needs, Ruby 3.1

Abstract

Ruby's core Forwardable gets the job done(barely), but produces most unreadable code.

License

This software is released under the Apache 2.0 License

Performance

Execution time is that of 85~95% of Forwardable by evalling strings whenever possible.

How does it work?

Let us speculate about that:

As simple as it gets

Given a class

require 'forwarder'
class MyClass
  extend Forwarder

  attr_reader :string

  forward :length, to: :@string
  forward :len, to: :string, as: :length

  def initialize; @string = 'Robert' end
end

Then it forwards as expected

  expect(MyClass.new.length).to eq(6)
  expect(MyClass.new.len).to eq(6)

LICENSE

Copyright 2022,3 Robert Dober robert.dober@gmail.com,

Apache-2.0 c.f LICENSE

FAQs

Package last updated on 30 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.