No release in over 3 years
Low commit activity in last 3 years
TOISB provides a wrapper class and a helper module for dealing with BasicObjects in style!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 0.2.1
 Project Readme

That Object is So Basic!

TOISB lets you play with BasicObject and other weird objects in Ruby in style and without breaking (as many) things.

Gem GitHub Workflow Status (with event) Code Climate maintainability

Usage

Install the gem like gem install that_object_is_so_basic then use it like this:

require "toisb"

# TOISB was originally extracted from the Impasta and Uspec gems
class Impasta < BasicObject; end
spy = Impasta.new

# Wraps any BasicObject or subclass, including normal Objects
toisb = TOISB.wrap spy

toisb.klass #=> Impasta
toisb.superklass #=> BasicObject
tosib.inspector #=> "#<BasicObject/Impasta:0x2b1fcfc70474>"
toisb.singleton #=> #<Class:#<Impasta:0x0000563f9f8e08e8>>
toisb.ancestors #=> [#<Class:#<Impasta:0x0000563f9f8e08e8>>, Impasta, BasicObject]
toisb.safe_send :to_s #=> "#<TestObject:0x00005563c4965d48>"

Author

© 2019-2024 Anthony M. Cook