Class: CcLicenseable::CcLicense
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CcLicenseable::CcLicense
- Defined in:
- app/models/cc_licenseable/cc_license.rb
Instance Method Summary collapse
- #desc ⇒ Object
- #form_title ⇒ Object
- #legal_link ⇒ Object
- #med_btn ⇒ Object
- #small_btn ⇒ Object
-
#summary_link ⇒ Object
leave links containing url as this might change, so don’t extract it yet.
- #title ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#desc ⇒ Object
16 17 18 |
# File 'app/models/cc_licenseable/cc_license.rb', line 16 def desc I18n.t("cc_licenseable.#{abbr}.desc") end |
#form_title ⇒ Object
12 13 14 |
# File 'app/models/cc_licenseable/cc_license.rb', line 12 def form_title "CC #{abbreviation} (#{version})" end |
#legal_link ⇒ Object
25 26 27 |
# File 'app/models/cc_licenseable/cc_license.rb', line 25 def legal_link "http://creativecommons.org/licenses/#{abbr}/#{version}/legalcode" end |
#med_btn ⇒ Object
29 30 31 |
# File 'app/models/cc_licenseable/cc_license.rb', line 29 def med_btn "cc_licenseable/buttons/med/#{abbr}.svg" end |
#small_btn ⇒ Object
33 34 35 |
# File 'app/models/cc_licenseable/cc_license.rb', line 33 def small_btn "cc_licenseable/buttons/small/#{abbr}.svg" end |
#summary_link ⇒ Object
leave links containing url as this might change, so don’t extract it yet.
21 22 23 |
# File 'app/models/cc_licenseable/cc_license.rb', line 21 def summary_link "http://creativecommons.org/licenses/#{abbr}/#{version}/deed.#{locale}" end |
#title ⇒ Object
8 9 10 |
# File 'app/models/cc_licenseable/cc_license.rb', line 8 def title I18n.t("cc_licenseable.#{abbr}.title") end |
#to_s ⇒ Object
37 38 39 |
# File 'app/models/cc_licenseable/cc_license.rb', line 37 def to_s form_title end |