Class: Eg::Book::ChatServerActions
Constant Summary
Constants inherited
from Fit::Fixture
Fit::Fixture::GRAY, Fit::Fixture::GREEN, Fit::Fixture::RED, Fit::Fixture::YELLOW
Instance Attribute Summary
Attributes inherited from Fit::Fixture
#args, #counts, #listener, #summary
Instance Method Summary
collapse
camel, #check, #do_cell, #do_cells, #do_row, #do_rows, #do_table, #do_tables, #error, escape, #exception, #find_class, #fixture_name, #get_args_for_table, #get_linked_fixture_with_args, gray, #ignore, #info, #interpret_following_tables, #interpret_tables, label, metadata, #parse, #right, #total_errors, #totals, #wrong
Constructor Details
Returns a new instance of ChatServerActions.
7
8
9
|
# File 'lib/eg/book/chat_server_actions.rb', line 7
def initialize
@chat = ChatRoom.new
end
|
Instance Method Details
#connect ⇒ Object
13
14
15
|
# File 'lib/eg/book/chat_server_actions.rb', line 13
def connect
@chat.connect_user @user_name
end
|
#enter_room ⇒ Object
22
23
24
|
# File 'lib/eg/book/chat_server_actions.rb', line 22
def enter_room
@chat.user_enters_room @user_name, @room_name
end
|
#new_room ⇒ Object
19
20
21
|
# File 'lib/eg/book/chat_server_actions.rb', line 19
def new_room
@chat.user_creates_room @user_name, @room_name
end
|
#occupant_count ⇒ Object
25
26
27
|
# File 'lib/eg/book/chat_server_actions.rb', line 25
def occupant_count
@chat.occupants @room_name
end
|
#room(room_name) ⇒ Object
16
17
18
|
# File 'lib/eg/book/chat_server_actions.rb', line 16
def room room_name
@room_name = room_name
end
|
#user(user_name) ⇒ Object
10
11
12
|
# File 'lib/eg/book/chat_server_actions.rb', line 10
def user user_name
@user_name = user_name
end
|