Class: Tinychat::Room

Inherits:
Object
  • Object
show all
Defined in:
lib/tinychat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Room

Returns a new instance of Room.



9
10
11
12
13
# File 'lib/tinychat.rb', line 9

def initialize(data)
  data.each do |key, value|
    self.send("#{key}=", value) rescue(puts "attr_reader :#{key}")
  end
end

Instance Attribute Details

#broadcaster_countObject

Returns the value of attribute broadcaster_count.



8
9
10
# File 'lib/tinychat.rb', line 8

def broadcaster_count
  @broadcaster_count
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/tinychat.rb', line 8

def name
  @name
end

#namesObject

Returns the value of attribute names.



8
9
10
# File 'lib/tinychat.rb', line 8

def names
  @names
end

#picsObject

Returns the value of attribute pics.



8
9
10
# File 'lib/tinychat.rb', line 8

def pics
  @pics
end

#privObject

Returns the value of attribute priv.



8
9
10
# File 'lib/tinychat.rb', line 8

def priv
  @priv
end

#topicObject

Returns the value of attribute topic.



8
9
10
# File 'lib/tinychat.rb', line 8

def topic
  @topic
end

#total_countObject

Returns the value of attribute total_count.



8
9
10
# File 'lib/tinychat.rb', line 8

def total_count
  @total_count
end