From 1e32f43a4adbb34abaae7ed43c33dd5e743af3b3 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sat, 28 Sep 2013 16:04:51 -0700 Subject: [PATCH] reorder methods --- bin/blog.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/blog.rb b/bin/blog.rb index 46c6a5c..8e32447 100755 --- a/bin/blog.rb +++ b/bin/blog.rb @@ -118,6 +118,15 @@ class Blag end end + def shorten(n) + short = '' + while n > 0 + short = ShortURLCodeSet[n % ShortURLBase, 1] + short + n = (n / ShortURLBase).floor + end + short + end + def copy_assets Dir[File.join(@src, 'css', '*.css')].each do |stylesheet| minified = File.join(@css_dest, File.basename(stylesheet).sub('.css', '.min.css')) @@ -209,7 +218,7 @@ class Blag def rss_html(post) Mustache.render(rss_template(post[:type]), { :post => post }) end - + def rss_for_posts(options = {}) title = options[:title] || @title subtitle = options[:subtitle] || @subtitle @@ -248,15 +257,6 @@ class Blag xml end - def shorten(n) - short = '' - while n > 0 - short = ShortURLCodeSet[n % ShortURLBase, 1] + short - n = (n / ShortURLBase).floor - end - short - end - end main if $0 == __FILE__