summaryrefslogtreecommitdiff
path: root/lib/license.rb
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-06 19:50:45 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-06 19:50:45 -0500
commit7edb003cd1c9b53ffdff11ef85532e39f08db16d (patch)
tree180db82a4af7720508ae2732393401bf4d27cadf /lib/license.rb
parent7d875df65221d4da91953cf129a03e76fe8e5d29 (diff)
wip
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