lib/atom/entry.rb in atom-tools-0.9.1 vs lib/atom/entry.rb in atom-tools-0.9.2
- old
+ new
@@ -87,9 +87,22 @@
string.split.each do |tag|
categories.new["term"] = tag
end
end
+ # the @href of an entry's link[@rel="edit"]
+ def edit_url
+ begin
+ edit_link = self.links.find do |link|
+ link["rel"] == "edit"
+ end
+
+ edit_link["href"]
+ rescue
+ nil
+ end
+ end
+
# XXX this needs a test suite before it can be trusted.
=begin
# tests the entry's validity
def valid?
self.class.required.each do |element|