Module: Transproc::Functions

Included in:
ArrayTransformations, Coercions, Conditional, HashTransformations, Recursion
Defined in:
lib/transproc.rb

Overview

Function container extension

Examples:

module MyTransformations
  extend Transproc::Functions

  def boom!(value)
    "#{value} BOOM!"
  end
end

Transproc(:boom!)['w00t!'] # => "w00t! BOOM!"

Instance Method Summary collapse

Instance Method Details

#method_added(meth) ⇒ Object



55
56
57
58
# File 'lib/transproc.rb', line 55

def method_added(meth)
  module_function meth
  Transproc.register(meth, method(meth))
end