123456789_123456789_123456789_123456789_123456789_

Module: RSS::Maker::SetupDefaultLanguage

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rss/maker/base.rb

Instance Method Summary

Instance Method Details

#_set_default_values (private)

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 383

def _set_default_values
  keep = {
    :dc_languages => dc_languages.to_a.dup,
  }
  _language = language
  if _language and
      !dc_languages.any? {|dc_language| dc_language.value == _language}
    dc_language = self.class::DublinCoreLanguages::DublinCoreLanguage.new(self)
    dc_language.value = _language.dup
    dc_languages.unshift(dc_language)
  end
  super
ensure
  dc_languages.replace(keep[:dc_languages])
end