Class: CcLicenseable::CcLicense

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/cc_licenseable/cc_license.rb

Instance Method Summary collapse

Instance Method Details

#descObject



16
17
18
# File 'app/models/cc_licenseable/cc_license.rb', line 16

def desc
  I18n.t("cc_licenseable.#{abbr}.desc")
end

#form_titleObject



12
13
14
# File 'app/models/cc_licenseable/cc_license.rb', line 12

def form_title
  "CC #{abbreviation} (#{version})"
end


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_btnObject



29
30
31
# File 'app/models/cc_licenseable/cc_license.rb', line 29

def med_btn
  "cc_licenseable/buttons/med/#{abbr}.svg"
end

#small_btnObject



33
34
35
# File 'app/models/cc_licenseable/cc_license.rb', line 33

def small_btn
  "cc_licenseable/buttons/small/#{abbr}.svg"
end

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

#titleObject



8
9
10
# File 'app/models/cc_licenseable/cc_license.rb', line 8

def title
  I18n.t("cc_licenseable.#{abbr}.title")
end

#to_sObject



37
38
39
# File 'app/models/cc_licenseable/cc_license.rb', line 37

def to_s
  form_title
end