freemo,
@freemo@qoto.org avatar

A little gem I just published that allows you to create true abstract classes and methods in Ruby. Basically throws an error at instantiation / creation of an abstract class if abstract methods arent implemented.

While there are a few gems that allow you to create abstract classes and methods all of the ones i found just cause abstract methods to throw errors when called if not implemented. This solution actually throws an error when you attempt to create the class itself, so it is fail-fast and more in line with the spirit of an abstract method.

Repo: https://git.qoto.org/abstractify/abstractify/-/blob/master/spec/abstractify/abstract_spec.rb

Gem: https://rubygems.org/gems/abstractify

PS: Probably the first and only project I will ever write with a true 100% code coverage report :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • ruby
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines