Class: FbGraph::Tag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Comparison

#==

Constructor Details

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

Returns a new instance of Tag.



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

def initialize(identifier, attributes = {})
  @x = attributes.delete(:x)
  @y = attributes.delete(:y)
  if (created_time = attributes.delete(:created_time))
    @created_time = Time.parse(created_time).utc
  end
  @user = User.new(identifier, attributes)
end

Instance Attribute Details

#created_timeObject

Returns the value of attribute created_time.



5
6
7
# File 'lib/fb_graph/tag.rb', line 5

def created_time
  @created_time
end

#userObject

Returns the value of attribute user.



5
6
7
# File 'lib/fb_graph/tag.rb', line 5

def user
  @user
end

#xObject

Returns the value of attribute x.



5
6
7
# File 'lib/fb_graph/tag.rb', line 5

def x
  @x
end

#yObject

Returns the value of attribute y.



5
6
7
# File 'lib/fb_graph/tag.rb', line 5

def y
  @y
end