Method: Estreet::Function#initialize

Defined in:
lib/estreet/function.rb

#initialize(params, body) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/estreet/function.rb', line 3

def initialize(params, body)
  # TODO: join multiple blocks in the body, or whatever?
  # TODO: allow body to be an expression -- ES6 expression closure

  @params = params.map(&:to_pattern)
  @body   = body.to_block
end