lib/maily/mailer.rb in maily-0.7.1 vs lib/maily/mailer.rb in maily-0.7.2

- old
+ new

@@ -17,15 +17,23 @@ def self.all Maily.load_emails_and_hooks if collection.nil? collection end + def self.list + all.values.sort_by(&:name) + end + def self.find(mailer_name) all[mailer_name] end def find_email(email_name) emails[email_name.to_s] + end + + def emails_list + emails.values.sort_by(&:name) end def total_emails emails.size end \ No newline at end of file