blob: 3e3b00f81078ac0f606c27255ea38c040d248a4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
% This is a cat. It behaves like a generic object.
-module(a_cat).
-behaviour(gen_object).
-export([initialise/1, handle_message/3]).
initialise([Name]) ->
{Name, "Meow"}.
handle_message(say, [Word], {Name, Word}) ->
{Word, {Name, Word}};
handle_message(say, _, State) ->
{"", State}.
|