Class: Room
- Inherits:
-
Object
- Object
- Room
- Defined in:
- models.rb
Class Method Summary (collapse)
-
+ (Int) count_objects(value)
Counts objects.
-
+ (string) description
Room description.
-
+ (string) exits
Room exits.
-
+ (Array) monsters_bold
Monsters bold.
-
+ (string) objects
Room objects.
-
+ (string) players
Room players.
-
+ (string) title
Room title.
Class Method Details
+ (Int) count_objects(value)
Counts objects.
219 220 221 |
# File 'models.rb', line 219 def self.count_objects(value) self.objects.scan(value).length end |
+ (string) description
Room description.
173 174 175 176 |
# File 'models.rb', line 173 def self.description $_api_socket.puts "GET ROOM_DESC\n" $_api_socket.gets('\0').chomp('\0').to_s end |
+ (string) exits
Room exits.
206 207 208 209 |
# File 'models.rb', line 206 def self.exits $_api_socket.puts "GET ROOM_EXITS\n" $_api_socket.gets('\0').chomp('\0').to_s end |
+ (Array) monsters_bold
Note:
set MonsterBold echo Room::monsters_bold
> [“a ship's rat”]
Monsters bold.
230 231 232 233 |
# File 'models.rb', line 230 def self.monsters_bold $_api_socket.puts "GET ROOM_MONSTERS_BOLD\n" $_api_socket.gets('\0').chomp('\0').to_s.split("\n") end |
+ (string) objects
Room objects.
184 185 186 187 |
# File 'models.rb', line 184 def self.objects $_api_socket.puts "GET ROOM_OBJECTS\n" $_api_socket.gets('\0').chomp('\0').to_s end |
+ (string) players
Room players.
195 196 197 198 |
# File 'models.rb', line 195 def self.players $_api_socket.puts "GET ROOM_PLAYERS\n" $_api_socket.gets('\0').chomp('\0').to_s end |
+ (string) title
Room title.
161 162 163 164 |
# File 'models.rb', line 161 def self.title $_api_socket.puts "GET ROOM_TITLE\n" $_api_socket.gets('\0').chomp('\0').to_s end |