module Transproc::Functions

Function container extension

@example

module MyTransformations
  extend Transproc::Functions

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

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

@api public

Public Class Methods

extended(mod) click to toggle source
Calls superclass method
# File lib/transproc/functions.rb, line 19
def self.extended(mod)
  warn 'Transproc::Functions is deprecated please switch to Transproc::Registry'
  super
end

Public Instance Methods

method_added(meth) click to toggle source
# File lib/transproc/functions.rb, line 24
def method_added(meth)
  module_function meth
  Transproc.register(meth, method(meth))
end