lib/hackety_hack/lessons.rb in hackety_hack-lessons-1.0.1 vs lib/hackety_hack/lessons.rb in hackety_hack-lessons-1.0.2
- old
+ new
@@ -13,9 +13,13 @@
def find_by_title(title)
all.find{|data| data.metadata["title"] == title}
end
+ def find_by_slug(slug)
+ all.find{|data| data.metadata["slug"] == slug}
+ end
+
def all
FILE_LIST.collect{|file| Metadown.render(File.read(file)) }
end
end
end