GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: A new revision of Fuzed, the Erlang-based frontend for web apps. Check out the mailing list at http://groups.google.com/group/fuzed
Clone URL: git://github.com/KirinDave/fuzed.git
fuzed / rlibs / fake_node.rb
100644 31 lines (23 sloc) 0.542 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'chassis'
require 'rubygems'
require 'erlectricity'
require 'optparse'
 
 
# speller handler
class FakeHandler < Chassis
  kind "fake"
 
  handle(:echo, :textsy, :options) do |args|
    "You said: " + args[:textsy] + ' ' + args[:options].inspect
  end
  
  handle(:killer) do |args|
    exit
  end
 
  handle(:woot) do |args|
    "Boots are delightful."
  end
  
  handle(:mangler) do |args|
    return_and_exit("Let slip the dogs of war")
  end
 
  handle(:failboat) do |args|
    raise "This boat failed under an endless sky."
  end
end