Skip to content

A few helpers for manipulating methods on an instance of an object.

License

Notifications You must be signed in to change notification settings

NullVoxPopuli/meta-instance-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS GEM IS NO LONGER BEING MAINTAINED

Alternate version here (Under the same name) with cleaner api to meta-methods

MetaInstance

Gem Version Build Status Code Climate Test Coverage Dependency Status Security

A few helpers for manipulating methods on an instance of an object.

In your Gemfile

gem 'meta_instance'

Usage

With a class:

class Foo
  include MetaInstance

  def bar; "bar"; end
end

You can do this:

f = Foo.new
f.bar
# => "bar"

f.instance_define(:bar){ "foo" }
f.bar
# => "foo"

Foo.new.bar
# => "bar"

See Specs for examples :-)

About

A few helpers for manipulating methods on an instance of an object.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages