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!
- Host: GitHub
- URL: https://github.com/acook/that_object_is_so_basic
- Owner: acook
- License: apache-2.0
- Created: 2019-06-17T08:28:50.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-01-03T07:58:49.000Z (over 2 years ago)
- Last Synced: 2025-05-21T22:28:18.588Z (about 1 year ago)
- Topics: debugging-tool, minimalist-library, object-oriented, ruby, testing-tools
- Language: Ruby
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
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.
[](https://rubygems.org/gems/that_object_is_so_basic)
[](https://github.com/acook/that_object_is_so_basic/actions)
[](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