InstanceTracker
A Simple Ruby DSL for Instance Tracking.
Installation
Add this line to your application's Gemfile:
gem 'instance_tracker'
And then execute:
$ bundle
Or install it yourself as:
$ gem install instance_tracker
API Summary
Start by including InstanceTracker::Trackable
within classes in which
you want to track an instance variable; this provides the class
a track
class method which allows you to define which instance
variable to track.
class Foo
include InstanceTracker::Trackable
track :wrapper
def initialize(wrapper)
@wrapper = wrapper
end
end
You are now able to access the wrapper
by simply calling
trackable_instance
from any instance of your class.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
This project rocks and uses MIT-LICENSE.