123456789_123456789_123456789_123456789_123456789_

Class: RSS::Maker::RSS09::Channel

Constant Summary

::RSS::Maker::Base - Inherited

NEED_INITIALIZE_VARIABLES, OTHER_ELEMENTS

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

This class inherits a constructor from RSS::Maker::Base

Instance Method Details

#not_set_required_variables (private)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 64

def not_set_required_variables
  vars = super
  vars << "description" unless description {|d| d.have_required_values?}
  vars << "title" unless title {|t| t.have_required_values?}
  vars
end

#required_variable_names (private)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 60

def required_variable_names
  %w(link language)
end

#setup_image(rss) (private)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 48

def setup_image(rss)
  @maker.image.to_feed(rss)
end

#setup_items(rss) (private)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 44

def setup_items(rss)
  @maker.items.to_feed(rss)
end

#setup_textinput(rss) (private)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 52

def setup_textinput(rss)
  @maker.textinput.to_feed(rss)
end

#to_feed(rss)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 26

def to_feed(rss)
  channel = Rss::Channel.new
  setup_values(channel)
  _not_set_required_variables = not_set_required_variables
  if _not_set_required_variables.empty?
    rss.channel = channel
    set_parent(channel, rss)
    setup_items(rss)
    setup_image(rss)
    setup_textinput(rss)
    setup_other_elements(rss, channel)
    rss
  else
    raise NotSetError.new("maker.channel", _not_set_required_variables)
  end
end

#variables (private)

[ GitHub ]

  
# File 'lib/rss/maker/0.9.rb', line 56

def variables
  super + ["pubDate"]
end