Class: Conreality::Game

Inherits:
Object
  • Object
show all
Defined in:
lib/conreality/game.rb

Overview

The game database.

Theaters collapse

Objects collapse

Events collapse

Messaging collapse

Instance Method Summary collapse

Constructor Details

#initialize(session) ⇒ Game

Returns a new instance of Game.

Parameters:



9
10
11
# File 'lib/conreality/game.rb', line 9

def initialize(session)
  @session = session
end

Instance Method Details

#each_object(&block) ⇒ Object



53
54
55
# File 'lib/conreality/game.rb', line 53

def each_object(&block)
  # TODO
end

#each_theater(&block) ⇒ Object



34
35
36
# File 'lib/conreality/game.rb', line 34

def each_theater(&block)
  # TODO
end

#find_event(id) ⇒ Event

TODO:

Returns the event.

Returns:



64
65
66
# File 'lib/conreality/game.rb', line 64

def find_event(id)
  # TODO
end

#find_message(id) ⇒ Message

TODO:

Returns the message.

Returns:



75
76
77
# File 'lib/conreality/game.rb', line 75

def find_message(id)
  # TODO
end

#find_object(uuid) ⇒ Object

Returns the object identified by the given UUID.

Parameters:

  • uuid (String)

    the object’s UUID

Returns:



47
48
49
# File 'lib/conreality/game.rb', line 47

def find_object(uuid)
  Conreality::Object.new(@session, uuid)
end

#find_theater(uuid) ⇒ Theater

Returns the theater identified by the given UUID.

Parameters:

  • uuid (String)

    the theater’s UUID

Returns:



28
29
30
# File 'lib/conreality/game.rb', line 28

def find_theater(uuid)
  Conreality::Theater.new(@session, uuid)
end

#inspectString

Returns a developer-friendly representation of this action.

Returns:

  • (String)


17
18
19
# File 'lib/conreality/game.rb', line 17

def inspect
  sprintf("#<%s:%#0x>", self.class.name, self.__id__)
end