Sha256: 3115ece79f3f11e2518258ac6871509c12955dc034d06d3b54bcd6cc1698a333

Contents?: true

Size: 476 Bytes

Versions: 3

Compression:

Stored size: 476 Bytes

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'ernie'

state = 0

# Just about the easiest example I could thing of.
mod(:test) do
  fun(:zeronary) do
    :foo
  end

  fun(:unary) do |a|
    a
  end

  fun(:binary) do |a, b|
    a + b
  end

  fun(:ternary) do |a, b, c|
    a + b + c
  end

  fun(:set_state) do |x|
    state = x
    sleep 5
    nil
  end

  fun(:get_state) do
    state
  end

  fun(:cry) do
    raise "abandon hope!"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ernie-1.0.0 test/handler.rb
ernie-0.4.0 test/handler.rb
ernie-0.3.5 test/handler.rb