summaryrefslogtreecommitdiff
path: root/lib/license.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/license.rb')
-rw-r--r--lib/license.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/license.rb b/lib/license.rb
new file mode 100644
index 0000000..da68f30
--- /dev/null
+++ b/lib/license.rb
@@ -0,0 +1,17 @@
+# coding: utf-8
+require 'config'
+
+class License
+ def initialize(name)
+ @name = name
+ end
+ def name
+ @name
+ end
+ def url
+ Config::get.license_uri(@name)
+ end
+ def html
+ "<a href=\"#{url}\">#{name}</a>"
+ end
+end