Class: FbGraph::FriendRequest

Inherits:
Object
  • Object
show all
Includes:
Comparison
Defined in:
lib/fb_graph/friend_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Comparison

#==

Constructor Details

#initialize(attributes = {}) ⇒ FriendRequest

Returns a new instance of FriendRequest.



6
7
8
9
10
11
12
# File 'lib/fb_graph/friend_request.rb', line 6

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

Instance Attribute Details

#created_timeObject

Returns the value of attribute created_time.



4
5
6
# File 'lib/fb_graph/friend_request.rb', line 4

def created_time
  @created_time
end

#fromObject

Returns the value of attribute from.



4
5
6
# File 'lib/fb_graph/friend_request.rb', line 4

def from
  @from
end

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/fb_graph/friend_request.rb', line 4

def message
  @message
end

#toObject

Returns the value of attribute to.



4
5
6
# File 'lib/fb_graph/friend_request.rb', line 4

def to
  @to
end

#unreadObject

Returns the value of attribute unread.



4
5
6
# File 'lib/fb_graph/friend_request.rb', line 4

def unread
  @unread
end