Class: Sevendigital::DownloadUrlDigestor

Inherits:
Digestor
  • Object
show all
Defined in:
lib/sevendigital/digestion_tract/download_url_digestor.rb

Instance Method Summary collapse

Methods inherited from Digestor

#content_present?, #from_xml_string, #get_optional_attribute, #get_optional_node, #get_optional_value, #get_required_attribute, #get_required_node, #get_required_value, #initialize, #list_from_xml_doc, #list_from_xml_string, #make_sure_eating_nokogiri_node, #nested_list_from_xml_doc, #nested_list_from_xml_string, #paginate_results, #value_present?

Constructor Details

This class inherits a constructor from Sevendigital::Digestor

Instance Method Details

#default_element_nameObject

:nodoc:



6
# File 'lib/sevendigital/digestion_tract/download_url_digestor.rb', line 6

def default_element_name; :downloadUrl end

#default_list_element_nameObject



7
# File 'lib/sevendigital/digestion_tract/download_url_digestor.rb', line 7

def default_list_element_name; :downloadUrls end

#from_xml_doc(xml_node) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/sevendigital/digestion_tract/download_url_digestor.rb', line 9

def from_xml_doc(xml_node)
    make_sure_eating_nokogiri_node(xml_node)

    download_url = DownloadUrl.new()

    download_url.url = get_required_value(xml_node,"url")
    download_url.format = get_required_node(xml_node, "format") {|v| @api_client.format_digestor.from_xml_doc(v)}

    download_url
end