0.0
No commit activity in last 3 years
No release in over 3 years
A few helpers for manipulating methods on an instance of an object.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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 :-)