
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
== Description The 'use' library allows you to selectively mixin methods from a given module and alias them on the fly if desired.
== Prerequisites structured_warnings 0.3.0 or later
== Installation gem install use
== Synopsis require 'use'
module Foo def bar puts "hello" end def baz puts "world" end end
module Test def bar puts "goodbye" end def blah puts "new york" end end
class Zap use Foo, :bar use Test, :blah end
z = Zap.new
z.bar # => "hello" z.blah # => "new york" z.baz # => NoMethodError
class MyKlass use Foo, :alias => {:bar => :test} end
m = MyKlass.new m.test # => "hello" m.bar # => NoMethodError
== Constants USE_VERSION The version of this library. This is a string.
== Notes In $VERBOSE mode this library will issue a MethodRedefinedWarning if you shadow an existing method. See the documentation for structured_warnings for more details.
== Acknowledgements Thanks go to Ara Howard for providing the original solution and to Mauricio Fernandez, whose blog I plagiarized (and with whom I communicated) in order to implement fine-grained mixins.
== Known Bugs Some versions of Ruby 1.9.x may emit a warning in verbose mode. This is a bug in Ruby 1.9.x and can be ignored.
If you find any bugs please log them on the project page at https://github.com/djberg96/use
== License Apache-2.0
== Copyright (C) 2005-2019, Daniel J. Berger All Rights Reserved
== Author Daniel J. Berger
FAQs
Unknown package
We found that use demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.