Module: Transproc

Defined in:
lib/transproc.rb,
lib/transproc/hash.rb,
lib/transproc/version.rb,
lib/transproc/coercions.rb

Defined Under Namespace

Classes: Function

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



13
14
15
# File 'lib/transproc.rb', line 13

def self.[](name)
  functions.fetch(name)
end

.functionsObject



9
10
11
# File 'lib/transproc.rb', line 9

def self.functions
  @_functions ||= {}
end

.register(*args, &block) ⇒ Object



4
5
6
7
# File 'lib/transproc.rb', line 4

def self.register(*args, &block)
  name, fn = *args
  functions[name] = fn || block
end