mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
reorder methods
This commit is contained in:
parent
063ae60867
commit
1e32f43a4a
1 changed files with 10 additions and 10 deletions
20
bin/blog.rb
20
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__
|
||||
|
|
|
|||
Loading…
Reference in a new issue