Sha256: ac7acf316114e824825bf96ddcb72135a1c013b54d39e4ed64a280fe835668ba

Contents?: true

Size: 408 Bytes

Versions: 2

Compression:

Stored size: 408 Bytes

Contents

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

module Test
  # Add two numbers together
  def add(a, b)
    a + b
  end

  # Return the given number of bytes
  def bytes(n)
    'x' * n
  end

  # Sleep for +sec+ and then return :ok
  def slow(sec)
    sleep(sec)
    :ok
  end

  # Throw an error
  def error
    raise "abandon hope!"
  end
end

Ernie.expose(:test, Test)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ernie-1.3.0 examples/expose.rb
ernie-1.2.0 examples/expose.rb