Class: HipChat::Relation

Inherits:
Array
  • Object
show all
Defined in:
lib/hip_chat/relation.rb

Instance Method Summary collapse

Constructor Details

#initialize(token, list, list_class) ⇒ Relation

Returns a new instance of Relation.



3
4
5
6
7
8
9
10
11
12
# File 'lib/hip_chat/relation.rb', line 3

def initialize(token, list, list_class)
  super(list)

  @token = token
  @list_class = list_class

  self.map! do |element|
    list_class.new(@token, element)
  end
end