class DigitalBiblePlatform::DamId::Codes
Constants
- COLLECTIONS
- DRAMA_TYPES
- MEDIA_TYPES
- NEW_TESTAMENT
- NEW_TESTAMENT_SHORT_NAMES
- OLD_TESTAMENT
- OLD_TESTAMENT_SHORT_NAMES
Public Class Methods
collection(type)
click to toggle source
# File lib/digital_bible_platform/dam_id.rb, line 45 def collection(type) COLLECTIONS[type.to_sym] end
collection_from_book(book_short_name)
click to toggle source
# File lib/digital_bible_platform/dam_id.rb, line 49 def collection_from_book(book_short_name) return COLLECTIONS[:old_testament] if OLD_TESTAMENT_SHORT_NAMES.include? book_short_name return COLLECTIONS[:new_testament] if NEW_TESTAMENT_SHORT_NAMES.include? book_short_name end
drama(type)
click to toggle source
# File lib/digital_bible_platform/dam_id.rb, line 54 def drama(type) DRAMA_TYPES[type.to_sym] end
language(name)
click to toggle source
# File lib/digital_bible_platform/dam_id.rb, line 34 def language(name) lang = ISO_639.find(name.to_s.downcase) lang ||= ISO_639.find_by_english_name(name.to_s.capitalize) raise ArgumentError.new("#{name} Not recognized as a language") unless lang lang.alpha3_bibliographic.upcase end
media(type)
click to toggle source
# File lib/digital_bible_platform/dam_id.rb, line 58 def media(type) MEDIA_TYPES[type.to_sym] end
version(type)
click to toggle source
# File lib/digital_bible_platform/dam_id.rb, line 41 def version(type) type.upcase.to_s end