Skip to content
Extraits de code Groupes Projets
Valider ad14cd06 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

DG MS fixed bug where self was not in the module...wtf

parent 1118b56b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -5,24 +5,22 @@ module Diaspora
end
def self.process(xml)
doc = Nokogiri::HTML(xml)
parse_author(doc)
puts ""
parse_entry(doc)
end
def parse_author(doc)
def self.parse_author(doc)
doc = Nokogiri::HTML(doc) if doc.is_a? String
service = parse_service(doc)
feed_url = parse_feed_url(doc)
avatar_thumbnail = parse_avatar_thumbnail(doc)
username = parse_username(doc)
profile_url = parse_profile_url(doc)
puts "the sender:"
puts service
puts feed_url
......@@ -31,14 +29,13 @@ module Diaspora
puts profile_url
end
def parse_entry(doc)
def self.parse_entry(doc)
doc = Nokogiri::HTML(doc) if doc.is_a? String
message = parse_message(doc)
permalink = parse_permalink(doc)
published_at = parse_published_at(doc)
updated_at = parse_updated_at(doc)
puts "the message"
puts message
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter