summaryrefslogtreecommitdiff
path: root/lib/category.rb
blob: 266da34b9ef2d44e81a353534b853b4de85a2562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# coding: utf-8
require 'config'

class Category
	def initialize(abbr)
		@abbr = abbr
	end
	def abbr
		@abbr
	end
	def name
		Config::get.category_name(@abbr)
	end
	def html
		return "<a class=\"tag #{abbr}\" href=\"/tags/#{abbr}.html\">#{name}</a>"
	end
	def atom
		return "<category term=\"#{term}\" label=\"#{name}\" />"
	end
end