class It

Public Instance Methods

method_missing(*args, &block) click to toggle source
# File lib/hobo_support/methodphitamine.rb, line 20
def method_missing(*args, &block)
  @methods << [args, block] unless args == [:respond_to?, :to_proc]
  self
end
to_proc() click to toggle source
# File lib/hobo_support/methodphitamine.rb, line 25
def to_proc
  lambda do |obj|
    @methods.inject(obj) do |current,(args,block)|
      current.send(*args, &block)
    end
  end
end

Public Class Methods

new() click to toggle source
# File lib/hobo_support/methodphitamine.rb, line 16
def initialize
  @methods = []
end