Class: FbGraph::Score

Inherits:
Node
  • Object
show all
Defined in:
lib/fb_graph/score.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#access_token, #endpoint, #identifier, #raw_attributes

Instance Method Summary collapse

Methods inherited from Node

#connection, #destroy, fetch, #fetch, #update

Methods included from Comparison

#==

Constructor Details

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

Returns a new instance of Score.



5
6
7
8
9
10
11
12
13
14
# File 'lib/fb_graph/score.rb', line 5

def initialize(identifier, attributes = {})
  super
  if user = attributes[:user]
    @user = User.new(user[:id], user)
  end
  if app = attributes[:application]
    @application = Application.new(app[:id], app)
  end
  @score = attributes[:score]
end

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



3
4
5
# File 'lib/fb_graph/score.rb', line 3

def application
  @application
end

#scoreObject

Returns the value of attribute score.



3
4
5
# File 'lib/fb_graph/score.rb', line 3

def score
  @score
end

#userObject

Returns the value of attribute user.



3
4
5
# File 'lib/fb_graph/score.rb', line 3

def user
  @user
end