Giter VIP home page Giter VIP logo

that_object_is_so_basic's Introduction

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

that_object_is_so_basic's People

Watchers

 avatar  avatar

that_object_is_so_basic's Issues

Improve compatiblity with Rubies v2.0-2.2

2.3 includes features which allow the safe_send test to work. If anyone has need of TOISB or its dependents then improving compatibility with these old unsupported versions of Ruby would be nice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.