Module: Poms::HasBaseAttributes

Included in:
Broadcast, Season, Series
Defined in:
lib/poms/has_base_attributes.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



10
11
12
# File 'lib/poms/has_base_attributes.rb', line 10

def description
  @description ||= descriptions.first.value rescue nil
end

#titleObject



3
4
5
6
7
8
# File 'lib/poms/has_base_attributes.rb', line 3

def title
  return @title if @title
  main_title = select_title_by_type 'MAIN'
  sub_title = select_title_by_type 'SUB'
  @titel = (sub_title && sub_title.match(main_title)) ? sub_title : [main_title, sub_title].compact.join(": ")
end