Class: Jabber::UserTune::Tune

Inherits:
XMPPElement show all
Defined in:
lib/xmpp4r/tune/tune.rb

Overview

The XMPP element, as defined in XEP-0118 User Tune

See http://www.xmpp.org/extensions/xep-0118.html - this element encapsulates metadata (artist, track etc) about a tune the user is currently playing. These are expressed as child elements such as , etc which are also managed by this class.</p> <p>If the element has no children then it indicates that the user has stopped playing a tune. Use the Tune#playing? method to discover this?</p> </div> </div> <div class="tags"> </div> <h2> Instance Method Summary <small><a href="#" class="summary_toggle">collapse</a></small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#artist-instance_method" title="#artist (instance method)">#<strong>artist</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get the artist for this tune.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(artist = nil, title = nil, length = nil, track = nil, source = nil, uri = nil, rating = nil) ⇒ Tune </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'><p>Construct a new <tune> element.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#length-instance_method" title="#length (instance method)">#<strong>length</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get the length of this tune, in seconds.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#playing%3F-instance_method" title="#playing? (instance method)">#<strong>playing?</strong> ⇒ Boolean </a> </span> <span class="summary_desc"><div class='inline'><p>Returns true if a tune is currently playing, otherwise false.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#rating-instance_method" title="#rating (instance method)">#<strong>rating</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get the rating for this track.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#source-instance_method" title="#source (instance method)">#<strong>source</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get the source of this tune, such as an album.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#title-instance_method" title="#title (instance method)">#<strong>title</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get the title of this tune.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#track-instance_method" title="#track (instance method)">#<strong>track</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get an identitier for this tune.</p></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune#uri-instance_method" title="#uri (instance method)">#<strong>uri</strong> ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Get a URI that represents this tune.</p></div></span> </li> </ul> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement" title="Jabber::XMPPElement (class)">XMPPElement</a></span></h3> <p class="inherited"><span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#class_for_name_xmlns-class_method" title="Jabber::XMPPElement.class_for_name_xmlns (method)">class_for_name_xmlns</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#clone-instance_method" title="Jabber::XMPPElement#clone (method)">#clone</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#force_xmlns-class_method" title="Jabber::XMPPElement.force_xmlns (method)">force_xmlns</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#force_xmlns%3F-class_method" title="Jabber::XMPPElement.force_xmlns? (method)">force_xmlns?</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#import-class_method" title="Jabber::XMPPElement.import (method)">import</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#name_xmlns-class_method" title="Jabber::XMPPElement.name_xmlns (method)">name_xmlns</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#name_xmlns_for_class-class_method" title="Jabber::XMPPElement.name_xmlns_for_class (method)">name_xmlns_for_class</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#parent=-instance_method" title="Jabber::XMPPElement#parent= (method)">#parent=</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#set_xml_lang-instance_method" title="Jabber::XMPPElement#set_xml_lang (method)">#set_xml_lang</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#typed_add-instance_method" title="Jabber::XMPPElement#typed_add (method)">#typed_add</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#xml_lang-instance_method" title="Jabber::XMPPElement#xml_lang (method)">#xml_lang</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/XMPPElement#xml_lang=-instance_method" title="Jabber::XMPPElement#xml_lang= (method)">#xml_lang=</a></span></p> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element" title="REXML::Element (class)">REXML::Element</a></span></h3> <p class="inherited"><span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#==-instance_method" title="REXML::Element#== (method)">#==</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#delete_elements-instance_method" title="REXML::Element#delete_elements (method)">#delete_elements</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#each_elements-instance_method" title="REXML::Element#each_elements (method)">#each_elements</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#first_element-instance_method" title="REXML::Element#first_element (method)">#first_element</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#first_element_content-instance_method" title="REXML::Element#first_element_content (method)">#first_element_content</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#first_element_text-instance_method" title="REXML::Element#first_element_text (method)">#first_element_text</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#import-instance_method" title="REXML::Element#import (method)">#import</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#import-class_method" title="REXML::Element.import (method)">import</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#replace_element_content-instance_method" title="REXML::Element#replace_element_content (method)">#replace_element_content</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#replace_element_text-instance_method" title="REXML::Element#replace_element_text (method)">#replace_element_text</a></span>, <span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/REXML/Element#typed_add-instance_method" title="REXML::Element#typed_add (method)">#typed_add</a></span></p> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="initialize-instance_method"> #<strong>initialize</strong>(artist = nil, title = nil, length = nil, track = nil, source = nil, uri = nil, rating = nil) ⇒ <tt><span class='object_link'><a href="/gems/gmcmillan-xmpp4r/0.5/Jabber/UserTune/Tune" title="Jabber::UserTune::Tune (class)">Tune</a></span></tt> </h3><script> document.getElementById("initialize-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:initialize">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Construct a new <tune> element.</p> <p>Supply no arguments to make an empty element to indicate that tune playing has stopped.</p> <dl> <dt>artist</dt> <dd><p>[String] the artist or performer of the song or piece</p></dd> <dt>title</dt> <dd><p>[String] the title of the song or piece</p></dd> <dt>length</dt> <dd><p>[Fixnum] the duration of the song or piece in seconds</p></dd> <dt>track</dt> <dd><p>[String] a unique identifier for the tune; e.g., the track number within a collection or the specific URI for the object (e.g., a stream or audio file)</p></dd> <dt>source</dt> <dd><p>[String] the collection (e.g., album) or other source (e.g., a band website that hosts streams or audio files)</p></dd> <dt>uri</dt> <dd><p>[String] a URI or URL pointing to information about the song, collection, or artist</p></dd> <dt>rating</dt> <dd><p>[Numeric] a number indicating how much you like this song - will be clamped into an integer 0 <= x <= 10</p></dd> </dl> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 40</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_artist identifier id'>artist</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_title identifier id'>title</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_length identifier id'>length</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_track identifier id'>track</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_source identifier id'>source</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_uri identifier id'>uri</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_rating identifier id'>rating</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span> <span class='rubyid_super super kw'>super</span><span class='lparen token'>(</span><span class='rparen token'>)</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'artist'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_artist identifier id'>artist</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_artist identifier id'>artist</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'title'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_title identifier id'>title</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_title identifier id'>title</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'length'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_length identifier id'>length</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_length identifier id'>length</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'track'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_track identifier id'>track</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_track identifier id'>track</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'source'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_source identifier id'>source</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_source identifier id'>source</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'uri'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_uri identifier id'>uri</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_uri identifier id'>uri</span> <span class='rubyid_if if kw'>if</span> <span class='rubyid_rating identifier id'>rating</span> <span class='rubyid_and and kw'>and</span> <span class='rubyid_rating identifier id'>rating</span><span class='dot token'>.</span><span class='rubyid_kind_of? fid id'>kind_of?</span><span class='lparen token'>(</span><span class='rubyid_Numeric constant id'>Numeric</span><span class='rparen token'>)</span> <span class='rubyid_r identifier id'>r</span> <span class='assign token'>=</span> <span class='rubyid_rating identifier id'>rating</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='rubyid_r identifier id'>r</span> <span class='assign token'>=</span> <span class='integer val'>0</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_r identifier id'>r</span> <span class='lt op'><</span> <span class='integer val'>0</span> <span class='rubyid_r identifier id'>r</span> <span class='assign token'>=</span> <span class='integer val'>10</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_r identifier id'>r</span> <span class='gt op'>></span> <span class='integer val'>10</span> <span class='rubyid_add_element identifier id'>add_element</span><span class='lparen token'>(</span><span class='rubyid_REXML constant id'>REXML</span><span class='colon2 op'>::</span><span class='rubyid_Element constant id'>Element</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'rating'</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='assign token'>=</span> <span class='rubyid_r identifier id'>r</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='rubyid_end end kw'>end</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> </div> <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="artist-instance_method"> #<strong>artist</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("artist-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:artist">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get the artist for this tune.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 72 73 74</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 72</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_artist identifier id'>artist</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'artist'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'artist'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="length-instance_method"> #<strong>length</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("length-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:length">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get the length of this tune, in seconds.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 84 85 86</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 84</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_length identifier id'>length</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'length'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'length'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="playing?-instance_method"> #<strong>playing?</strong> ⇒ <tt>Boolean</tt> </h3><script> document.getElementById("playing?-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:playing%3F">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Returns true if a tune is currently playing, otherwise false.</p> </div> </div> <div class="tags"> <p class="tag_title">Returns:</p> <ul class="return"> <li> <span class='type'>(<tt>Boolean</tt>)</span> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 66 67 68</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 66</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_playing? fid id'>playing?</span> <span class='lparen token'>(</span><span class='rubyid_elements identifier id'>elements</span><span class='dot token'>.</span><span class='rubyid_size identifier id'>size</span> <span class='gt op'>></span> <span class='integer val'>0</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="rating-instance_method"> #<strong>rating</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("rating-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:rating">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get the rating for this track</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 108 109 110</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 108</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_rating identifier id'>rating</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'rating'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'rating'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="source-instance_method"> #<strong>source</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("source-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:source">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get the source of this tune, such as an album.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 96 97 98</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 96</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_source identifier id'>source</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'source'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'source'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="title-instance_method"> #<strong>title</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("title-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:title">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get the title of this tune.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 78 79 80</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 78</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_title identifier id'>title</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'title'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'title'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="track-instance_method"> #<strong>track</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("track-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:track">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get an identitier for this tune.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 90 91 92</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 90</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_track identifier id'>track</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'track'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'track'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> <div class="method_details "> <h3 class="signature " id="uri-instance_method"> #<strong>uri</strong> ⇒ <tt>Object</tt> </h3><script> document.getElementById("uri-instance_method").insertAdjacentHTML( "afterbegin", '<a class="permalink" href="/gems/gmcmillan-xmpp4r/0.5/Jabber%2FUserTune%2FTune:uri">permalink</a>' ); </script> <div class="docstring"> <div class="discussion"> <p>Get a URI that represents this tune.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 102 103 104</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/xmpp4r/tune/tune.rb', line 102</span> <span class='rubyid_def def kw'>def</span> <span class='rubyid_uri identifier id'>uri</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'uri'</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_text identifier id'>text</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_first_element identifier id'>first_element</span><span class='lparen token'>(</span><span class='string val'>'uri'</span><span class='rparen token'>)</span> <span class='rubyid_end end kw'>end</span> </pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Sat Sep 19 16:55:52 2026 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.45 (ruby-4.0.7). </div> </div> </body> </html>