Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

floehopper/instantiator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instantiator Build Status Gem Version

I want to be able to instantiate an arbitrary Ruby class without knowing anything about the constructor.

The initial requirement for this has come from my Introspection project.

Usage

class ArbitraryClass
  def initialize(arg1, arg2, *other_args)
    # stuff
  end
end

require "instantiator"

instance = ArbitraryClass.instantiate

p instance.class # => ArbitraryClass

About

Instantiate an arbitrary Ruby class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages