Sha256: 407b1ff74276d929180985e55287a3532123195326be3957da5674a1cf2be1d8

Contents?: true

Size: 557 Bytes

Versions: 10

Compression:

Stored size: 557 Bytes

Contents

module Transproc
  # Function container extension
  #
  # @example
  #   module MyTransformations
  #     extend Transproc::Functions
  #
  #     def boom!(value)
  #       "#{value} BOOM!"
  #     end
  #   end
  #
  #   Transproc(:boom!)['w00t!'] # => "w00t! BOOM!"
  #
  # @api public
  module Functions
    def self.extended(mod)
      warn 'Transproc::Functions is deprecated please switch to Transproc::Registry'
      super
    end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
transproc-1.0.3 lib/transproc/functions.rb
transproc-1.0.2 lib/transproc/functions.rb
transproc-1.0.1 lib/transproc/functions.rb
transproc-1.0.0 lib/transproc/functions.rb
transproc-0.4.2 lib/transproc/functions.rb
transproc-0.4.1 lib/transproc/functions.rb
transproc-0.4.0 lib/transproc/functions.rb
transproc-0.3.2 lib/transproc/functions.rb
transproc-0.3.1 lib/transproc/functions.rb
transproc-0.3.0 lib/transproc/functions.rb