-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
div.chat-room data-item=dom_id | ||
div.message-holder data-item=dom_id(%{items}) | ||
== item_content | ||
div#form-holder data-item=dom_id(%{form-holder}) | ||
== display_form | ||
div.message-holder data-item=dom_id(%{items}) | ||
== item_content | ||
div#form-holder data-item=dom_id(%{form-holder}) | ||
== display_form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
module CardGame | ||
|
||
class GameObserver < Lattice::Connected::StaticBuffer | ||
class GameObserver < Lattice::Connected::ObjectList | ||
@max_items = 20 | ||
# When an event occurs, render it and add the rendered content | ||
# def content | ||
# # by putting this in rendered content we orverrid the autorendering | ||
# render "./src/card_game/game_observer.slang" | ||
# end | ||
def after_initialize | ||
add_element_class "observed-events" | ||
end | ||
|
||
def on_event( event, speaker ) | ||
if event.session_id && (session = Session.get event.session_id.as(String)) | ||
event_user = session.string?("name") || "" | ||
end | ||
add_content render "./src/card_game/observed_event.slang" | ||
end | ||
|
||
def after_initialize | ||
# @element_class = "observed-events" | ||
end | ||
|
||
end | ||
end |