Class: RTunesU::Section

Inherits:
Entity
  • Object
show all
Defined in:
lib/rtunesu/entities/section.rb

Overview

A Section in iTunes U. A Section is expressed in the iTunes interface as a visually seperate area on a single page. This is different than a Division which is a seperate nested area of iTunes U.

Instance Attribute Summary

Attributes inherited from Entity

#connection, #handle, #parent, #parent_handle, #saved, #source_xml

Instance Method Summary collapse

Methods inherited from Entity

attributes, base_connection, #base_connection, base_connection=, #class_name, composed_of, #edited?, #edits, get_base_connection, #handle_from_source, has_a, has_n, #initialize, #inspect, #reload, set_base_connection, validates!, #value_from_edits_or_store

Constructor Details

This class inherits a constructor from RTunesU::Entity

Instance Method Details

#to_xml(xml_builder = Builder::XmlMarkup.new) ⇒ Object

Sections have additional required attributes for updating. These attributes must appear in a specific order. see deimos.apple.com/rsrc/doc/iTunesUAdministratorsGuide/iTunesUWebServices/chapter_17_section_12.html



12
13
14
15
16
17
18
19
# File 'lib/rtunesu/entities/section.rb', line 12

def to_xml(xml_builder = Builder::XmlMarkup.new)
  if saved?
    xml_builder.tag!("SectionPath", '')
    xml_builder.tag!("MergeByHandle", "false")
    xml_builder.tag!("Destructive", "false")
  end
  super
end