Class: Map
- Inherits:
-
Object
- Object
- Map
- Defined in:
- models.rb
Class Method Summary (collapse)
-
+ (Hash) current_room
Current room.
-
+ (Hash) find_room(note)
Find room by note.
-
+ (Array) path(zone, from, to)
Path.
-
+ (Array) zones
Zones.
Class Method Details
+ (Hash) current_room
Current room
440 441 442 443 |
# File 'models.rb', line 440 def self.current_room $_api_socket.puts "MAP_GET CURRENT_ROOM\n" eval($_api_socket.gets('\0').chomp('\0').to_s) end |
+ (Hash) find_room(note)
Find room by note
453 454 455 456 |
# File 'models.rb', line 453 def self.find_room(note) $_api_socket.puts "MAP_GET FIND_ROOM?#{note}\n" eval($_api_socket.gets('\0').chomp('\0').to_s) end |
+ (Array) path(zone, from, to)
Path
418 419 420 421 |
# File 'models.rb', line 418 def self.path(zone, from, to) $_api_socket.puts "MAP_GET PATH?#{ERB::Util.url_encode(zone)}&#{ERB::Util.url_encode(from)}&#{ERB::Util.url_encode(to)}\n" $_api_socket.gets('\0').chomp('\0').split(",") end |
+ (Array) zones
Zones
429 430 431 432 |
# File 'models.rb', line 429 def self.zones $_api_socket.puts "MAP_GET ZONES\n" $_api_socket.gets('\0').chomp('\0').split(",") end |