lib/place/user.rb
# Retrieve a specific user data (based on name and url only)
Retrieve a specific user data (based on name and url only)
Retrieve a specific user data ( based on name and url only )
def retrieve
    content = IO.readlines(url).join('')
    doc = Nokogiri::XML(content)
	self.class.rules.each_pair do |k,v|
	  tmp = doc.xpath(v)
	  self.send("#{k}=", tmp[0].content)  unless tmp[0].nil?		
	end
	Place.logger.info("retrieved user at #{self.name}")
	self.save
  end
def retrieve content = IO . readlines ( url ) . join ( '' ) doc = Nokogiri :: XML ( content ) self . class . rules . each_pair do | k , v | tmp = doc . xpath ( v ) self . send ( "#{k}=" , tmp [ 0 ] . content ) unless tmp [ 0 ] . nil? end Place . logger . info ( "retrieved user at #{self.name}" ) self . save end
Retrieve a specific user data (based on name and url only)
Retrieve a specific user data ( based on name and url only )