class Hipmost::Hipchat::Room
Attributes
attrs[R]
channel[RW]
display_name[R]
id[R]
name[R]
team[RW]
topic[R]
Public Class Methods
new(attrs)
click to toggle source
# File lib/hipmost/hipchat/room.rb, line 29 def initialize(attrs) @id = attrs["id"] @name = attrs["name"].gsub(/\s/, "-").downcase @display_name = attrs["name"] @topic = attrs["topic"] @attrs = attrs end
Public Instance Methods
method_missing(method)
click to toggle source
# File lib/hipmost/hipchat/room.rb, line 51 def method_missing(method) attrs[method.to_s] end
posts()
click to toggle source
# File lib/hipmost/hipchat/room.rb, line 47 def posts @posts ||= PostRepository.for_room(self) end
private?()
click to toggle source
# File lib/hipmost/hipchat/room.rb, line 39 def private? privacy == "private" end
users()
click to toggle source
# File lib/hipmost/hipchat/room.rb, line 43 def users @users ||= attrs["members"].map{|uid| Hipchat.users[uid] } end