An open API service indexing awesome lists of open source software.

https://github.com/acook/that_object_is_so_basic

TOISB provides a wrapper class for dealing with BasicObjects in style!
https://github.com/acook/that_object_is_so_basic

debugging-tool minimalist-library object-oriented ruby testing-tools

Last synced: 12 months ago
JSON representation

TOISB provides a wrapper class for dealing with BasicObjects in style!

Awesome Lists containing this 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](https://img.shields.io/gem/v/that_object_is_so_basic.svg?style=for-the-badge)](https://rubygems.org/gems/that_object_is_so_basic)
[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/acook/that_object_is_so_basic/ruby.yml?style=for-the-badge)](https://github.com/acook/that_object_is_so_basic/actions)
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/acook/that_object_is_so_basic.svg?style=for-the-badge)](https://codeclimate.com/github/acook/that_object_is_so_basic)

Usage
-----

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

~~~ruby
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 #=> "#"
toisb.singleton #=> #>
toisb.ancestors #=> [#>, Impasta, BasicObject]
toisb.safe_send :to_s #=> "#"
~~~

Author
------

> © 2019-2024 Anthony M. Cook