Sha256: 7ab92b34597301f07467be0327d7358b35037afc4d5846228c9c3d8bbd8fc086

Contents?: true

Size: 496 Bytes

Versions: 2

Compression:

Stored size: 496 Bytes

Contents

module Firetower
  class Room
    attr_reader :id, :name, :account

    def initialize(account, attributes={})
      @account = account
      @id      = attributes['id']
      @name    = attributes['name']
    end

    def to_s
      "#{account.subdomain}/#{id} (#{name})"
    end

    def say!(message)
      account.say!(name, message)
    end

    def paste!(message)
      account.paste!(name, message)
    end
    
    def play!(message)
      account.play!(name, message)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
firetower-0.1.1 lib/firetower/room.rb
firetower-0.1.0 lib/firetower/room.rb