class RSS::Maker::RSS10::Items::Item

公共实例方法

to_feed(rss) 点击切换源代码
# File rss-0.3.1/lib/rss/maker/1.0.rb, line 234
def to_feed(rss)
  set_default_values do
    item = RDF::Item.new(link)
    set = setup_values(item)
    if set
      item.dc_dates.clear
      rss.items << item
      set_parent(item, rss)
      setup_other_elements(rss, item)
    elsif !have_required_values?
      raise NotSetError.new("maker.item", not_set_required_variables)
    end
  end
end

私有实例方法

not_set_required_variables() 点击切换源代码
调用父类方法
# File rss-0.3.1/lib/rss/maker/1.0.rb, line 258
def not_set_required_variables
  set_default_values do
    vars = super
    vars << "title" unless title {|t| t.have_required_values?}
    vars
  end
end
required_variable_names() 点击切换源代码
# File rss-0.3.1/lib/rss/maker/1.0.rb, line 250
def required_variable_names
  %w(link)
end
variables() 点击切换源代码
调用父类方法
# File rss-0.3.1/lib/rss/maker/1.0.rb, line 254
def variables
  super + %w(link)
end