模块 RSS::Maker::SetupDefaultLanguage

私有实例方法

_set_default_values() 点击切换源代码
调用父类方法
# File rss-0.3.1/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