diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-06 19:50:45 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-01-06 19:50:45 -0500 |
commit | 7edb003cd1c9b53ffdff11ef85532e39f08db16d (patch) | |
tree | 180db82a4af7720508ae2732393401bf4d27cadf /lib/tag.rb | |
parent | 7d875df65221d4da91953cf129a03e76fe8e5d29 (diff) |
wip
Diffstat (limited to 'lib/tag.rb')
-rw-r--r-- | lib/tag.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tag.rb b/lib/tag.rb new file mode 100644 index 0000000..4009f67 --- /dev/null +++ b/lib/tag.rb @@ -0,0 +1,17 @@ +# coding: utf-8 +require 'config' + +class Tag + def initialize(abbr) + @abbr = abbr + end + def abbr + @abbr + end + def name + Config::get.tag_name(@abbr) + end + def html + return "<a class=\"tag #{abbr}\" href=\"/tags/#{abbr}.html\">#{name}</a>" + end +end |