if is_root
root_tag(xml, :entry, &block)
else
- xml.entry &block
+ xml.entry(&block)
end
end
end
def author(xml, &block)
- xml.author &block
+ xml.author(&block)
end
def target(xml, &block)
- xml['activity'].object &block
+ xml['activity'].object(&block)
end
def object_type(xml, type)
private
def root_tag(xml, tag, &block)
- xml.send(tag, {xmlns: 'http://www.w3.org/2005/Atom', 'xmlns:thr': 'http://purl.org/syndication/thread/1.0', 'xmlns:activity': 'http://activitystrea.ms/spec/1.0/', 'xmlns:poco': 'http://portablecontacts.net/spec/1.0'}, &block)
+ xml.send(tag, { :xmlns => 'http://www.w3.org/2005/Atom', 'xmlns:thr' => 'http://purl.org/syndication/thread/1.0', 'xmlns:activity' => 'http://activitystrea.ms/spec/1.0/', 'xmlns:poco' => 'http://portablecontacts.net/spec/1.0' }, &block)
end
end
private
- def add_post!(entry, status)
+ def add_post!(_entry, status)
status.save!
end
status.save!
end
- def find_original_status(xml, id)
+ def find_original_status(_xml, id)
return nil if id.nil?
if local_id?(id)
end
def activity_id(xml)
- entry.at_xpath('./xmlns:id').content
+ xml.at_xpath('./xmlns:id').content
end
def target_content(xml)