Method: FbGraph::Poke#initialize

Defined in:
lib/fb_graph/poke.rb

#initialize(attributes = {}) ⇒ Poke

Returns a new instance of Poke.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fb_graph/poke.rb', line 7

def initialize(attributes = {})
  if from = attributes[:from]
    @from = User.new from[:id], from
  end
  if to = attributes[:to]
    @to = User.new to[:id], to
  end
  if attributes[:created_time]
    @created_time = Time.parse attributes[:created_time]
  end
end