Method: FbGraph::Group#initialize

Defined in:
lib/fb_graph/group.rb

#initialize(identifier, attributes = {}) ⇒ Group

Returns a new instance of Group.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fb_graph/group.rb', line 13

def initialize(identifier, attributes = {})
  super
  if (owner = attributes[:owner])
    @owner = User.new(owner[:id], owner)
  end
  @name         = attributes[:name]
  @email        = attributes[:email]
  @description  = attributes[:description]
  @link         = attributes[:link]
  @icon         = attributes[:icon]
  @privacy      = attributes[:privacy]
  @version      = attributes[:version]
  if attributes[:updated_time]
    @updated_time = Time.parse(attributes[:updated_time]).utc
  end
end