summaryrefslogtreecommitdiff
path: root/lib/category.rb
blob: b60c82e9bd6e8b27945ad1de015beecc93b4e3ed (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=\"#{abbr}\" label=\"#{name}\" />"
	end
end