No commit activity in last 3 years
No release in over 3 years
Forwardable with hash, and instance variable extensions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Build Status Test Coverage Code Climate Dependency Status

Forwardable Extended

Provides more Forwardable methods for your source as Forwardable::Extended.

class MyClass
  rb_delegate :method_name, :to => :@ivar, :type => :ivar, :boolean => true
  rb_delegate :method_name, :to => :@ivar, :type => :ivar, :boolean => :reverse
  rb_delegate :method_name, :to => :hash, :type => :hash, :key => :the_key
  rb_delegate :method_name_is_key, :to => :hash, :type => :hash
end
  • Any delegation can accept alias_of which will be the message sent to the object.
  • You can send arguments by attaching the keyword :args => [:my_arg], these are sent a #to_s message.
  • Any delegation can be boolean if you wish it to be, even :reverse.