lib/turntabler/room.rb
def enter
      if client.room != self
        # Leave the old room
        client.room.leave if client.room

        # Connect and register with this room
        client.connect(url)
        begin
          client.room = self
          data = api('room.register', :section => nil)
          self.attributes = {'section' => data['section']}
        rescue Exception
          client.room = nil
          raise
        end
      end

      true
    end
def enter
      if client.room != self
        # Leave the old room
        client.room.leave if client.room

        # Connect and register with this room
        client.connect(url)
        begin
          client.room = self
          data = api('room.register', :section => nil)
          self.attributes = {'section' => data['section']}
        rescue Exception
          client.room = nil
          raise
        end
      end

      true
    end
def enter if client . room != self # Leave the old room client . room . leave if client . room # Connect and register with this room client . connect ( url ) begin client . room = self data = api ( 'room.register' , :section => nil ) self . attributes = { 'section' => data [ 'section' ] } rescue Exception client . room = nil raise end end true end
Enters the current room.

 @note This will leave any room the user is already currently in (unless the same room is being entered)
 @return [true]
 @raise [Turntabler::Error] if the command fails
 @example
   room.enter    # => true
Enters the current room .