Module: Odlifier
- Defined in:
- lib/odlifier.rb,
lib/odlifier/version.rb
Defined Under Namespace
Classes: License
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.content_licenses ⇒ Object
List a load of content license IDs.
-
.translate(license_id, default = nil) ⇒ Object
Translate license IDs into English titles.
Class Method Details
.content_licenses ⇒ Object
List a load of content license IDs
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/odlifier.rb', line 48 def self.content_licenses [ 'cc-by', 'cc-by-sa', 'cc-zero', 'cc-nc', 'fal', 'odc-pddl', 'odc-by', 'odc-odbl', 'other-pd', 'uk-ogl', ] end |
.translate(license_id, default = nil) ⇒ Object
Translate license IDs into English titles
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/odlifier.rb', line 64 def self.translate(license_id, default = nil) { 'cc-by' => 'Creative Commons Attribution', 'cc-by-sa' => 'Creative Commons Attribution Share-Alike', 'cc-zero' => 'Creative Commons CCZero', 'cc-nc' => 'Creative Commons Non-Commercial', 'fal' => 'Free Art License', 'odc-pddl' => 'Open Data Commons Public Domain Dedication and Licence', 'odc-by' => 'Open Data Commons Attribution License', 'odc-odbl' => 'Open Data Commons Open Database License', 'other-pd' => 'Public domain', 'uk-ogl' => 'UK Open Government Licence', }[license_id] || default end |