2015-07-13 11:43:52 -04:00
|
|
|
class Room
|
|
|
|
attr_reader :id, :name
|
|
|
|
|
|
|
|
def initialize(id, name='Campfire')
|
|
|
|
@id = id
|
|
|
|
@name = name
|
|
|
|
end
|
|
|
|
|
|
|
|
def to_global_id
|
|
|
|
"Room##{id}-#{name}"
|
|
|
|
end
|
2015-07-21 21:03:47 -04:00
|
|
|
|
|
|
|
def to_gid_param
|
|
|
|
to_global_id.to_param
|
|
|
|
end
|
2015-07-13 11:43:52 -04:00
|
|
|
end
|