lib/fb_graph/work.rb in fb_graph-1.8.0 vs lib/fb_graph/work.rb in fb_graph-1.8.1
- old
+ new
@@ -5,27 +5,27 @@
attr_accessor :description, :employer, :location, :position, :projects, :with, :start_date, :end_date
def initialize(attributes = {})
@description = attributes[:description]
if (employer = attributes[:employer])
- @employer = Page.new(employer.delete(:id), employer)
+ @employer = Page.new(employer[:id], employer)
end
if (location = attributes[:location])
- @location = Page.new(location.delete(:id), location)
+ @location = Page.new(location[:id], location)
end
if (position = attributes[:position])
- @position = Page.new(position.delete(:id), position)
+ @position = Page.new(position[:id], position)
end
@projects = []
if attributes[:projects]
attributes[:projects].each do |project|
- @projects << Project.new(project.delete(:id), project)
+ @projects << Project.new(project[:id], project)
end
end
@with = []
if attributes[:with]
attributes[:with].each do |user|
- @with << User.new(user.delete(:id), user)
+ @with << User.new(user[:id], user)
end
end
if attributes[:start_date] && attributes[:start_date] != '0000-00'
year, month = attributes[:start_date].split('-').collect(&:to_i)
@start_date = if month.blank? || month == 0
\ No newline at end of file