<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: Pubnub::Presence — Documentation by YARD 0.8.7.6 </title> <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" /> <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = '../'; framesUrl = "../frames.html#!Pubnub/Presence.html"; </script> <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> </head> <body> <div id="header"> <div id="menu"> <a href="../_index.html">Index (P)</a> » <span class='title'><span class='object_link'><a href="../Pubnub.html" title="Pubnub (module)">Pubnub</a></span></span> » <span class="title">Presence</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../class_list.html"> Class List </a> <a class="full_list_link" id="method_list_link" href="../method_list.html"> Method List </a> <a class="full_list_link" id="file_list_link" href="../file_list.html"> File List </a> </div> <div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Class: Pubnub::Presence </h1> <dl class="box"> <dt class="r1">Inherits:</dt> <dd class="r1"> <span class="inheritName"><span class='object_link'><a href="SubscribeEvent.html" title="Pubnub::SubscribeEvent (class)">SubscribeEvent</a></span></span> <ul class="fullTree"> <li><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></li> <li class="next"><span class='object_link'><a href="Event.html" title="Pubnub::Event (class)">Event</a></span></li> <li class="next"><span class='object_link'><a href="SubscribeEvent.html" title="Pubnub::SubscribeEvent (class)">SubscribeEvent</a></span></li> <li class="next">Pubnub::Presence</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> <dt class="r2">Includes:</dt> <dd class="r2">Celluloid</dd> <dt class="r1 last">Defined in:</dt> <dd class="r1 last">lib/pubnub/events/presence.rb</dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Holds presence functionality, beware, most of presence functionality is held by SubscribeEvent</p> </div> </div> <div class="tags"> </div> <h2>Instance Attribute Summary</h2> <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="SubscribeEvent.html" title="Pubnub::SubscribeEvent (class)">SubscribeEvent</a></span></h3> <p class="inherited"><span class='object_link'><a href="SubscribeEvent.html#heart-instance_method" title="Pubnub::SubscribeEvent#heart (method)">#heart</a></span></p> <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Event.html" title="Pubnub::Event (class)">Event</a></span></h3> <p class="inherited"><span class='object_link'><a href="Event.html#callback-instance_method" title="Pubnub::Event#callback (method)">#callback</a></span>, <span class='object_link'><a href="Event.html#channel-instance_method" title="Pubnub::Event#channel (method)">#channel</a></span>, <span class='object_link'><a href="Event.html#error_callback-instance_method" title="Pubnub::Event#error_callback (method)">#error_callback</a></span>, <span class='object_link'><a href="Event.html#group-instance_method" title="Pubnub::Event#group (method)">#group</a></span>, <span class='object_link'><a href="Event.html#idle_timeout-instance_method" title="Pubnub::Event#idle_timeout (method)">#idle_timeout</a></span>, <span class='object_link'><a href="Event.html#open_timeout-instance_method" title="Pubnub::Event#open_timeout (method)">#open_timeout</a></span>, <span class='object_link'><a href="Event.html#origin-instance_method" title="Pubnub::Event#origin (method)">#origin</a></span>, <span class='object_link'><a href="Event.html#presence_callback-instance_method" title="Pubnub::Event#presence_callback (method)">#presence_callback</a></span>, <span class='object_link'><a href="Event.html#read_timeout-instance_method" title="Pubnub::Event#read_timeout (method)">#read_timeout</a></span></p> <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="#format_channels-instance_method" title="#format_channels (instance method)">- (Object) <strong>format_channels</strong> </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#initialize-instance_method" title="#initialize (instance method)">- (Presence) <strong>initialize</strong>(options, app) </a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'><p>A new instance of Presence.</p> </div></span> </li> </ul> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="SubscribeEvent.html" title="Pubnub::SubscribeEvent (class)">SubscribeEvent</a></span></h3> <p class="inherited"><span class='object_link'><a href="SubscribeEvent.html#fire-instance_method" title="Pubnub::SubscribeEvent#fire (method)">#fire</a></span>, <span class='object_link'><a href="SubscribeEvent.html#leave_all-instance_method" title="Pubnub::SubscribeEvent#leave_all (method)">#leave_all</a></span></p> <h3 class="inherited">Methods included from <span class='object_link'><a href="Formatter.html" title="Pubnub::Formatter (module)">Formatter</a></span></h3> <p class="inherited"><span class='object_link'><a href="Formatter.html#channels_for_url-class_method" title="Pubnub::Formatter.channels_for_url (method)">channels_for_url</a></span>, <span class='object_link'><a href="Formatter.html#classify_method-class_method" title="Pubnub::Formatter.classify_method (method)">classify_method</a></span>, <span class='object_link'><a href="Formatter.html#encode-class_method" title="Pubnub::Formatter.encode (method)">encode</a></span>, <span class='object_link'><a href="Formatter.html#format_channel-class_method" title="Pubnub::Formatter.format_channel (method)">format_channel</a></span>, <span class='object_link'><a href="Formatter.html#format_group-class_method" title="Pubnub::Formatter.format_group (method)">format_group</a></span>, <span class='object_link'><a href="Formatter.html#format_message-class_method" title="Pubnub::Formatter.format_message (method)">format_message</a></span>, <span class='object_link'><a href="Formatter.html#format_presence_channel-class_method" title="Pubnub::Formatter.format_presence_channel (method)">format_presence_channel</a></span>, <span class='object_link'><a href="Formatter.html#make_channel_array-class_method" title="Pubnub::Formatter.make_channel_array (method)">make_channel_array</a></span>, <span class='object_link'><a href="Formatter.html#params_hash_to_url_params-class_method" title="Pubnub::Formatter.params_hash_to_url_params (method)">params_hash_to_url_params</a></span>, <span class='object_link'><a href="Formatter.html#parse_json-class_method" title="Pubnub::Formatter.parse_json (method)">parse_json</a></span>, <span class='object_link'><a href="Formatter.html#valid_json%3F-class_method" title="Pubnub::Formatter.valid_json? (method)">valid_json?</a></span></p> <h3 class="inherited">Methods included from <span class='object_link'><a href="SubscribeEvent/Removing.html" title="Pubnub::SubscribeEvent::Removing (module)">SubscribeEvent::Removing</a></span></h3> <p class="inherited"><span class='object_link'><a href="SubscribeEvent/Removing.html#remove-instance_method" title="Pubnub::SubscribeEvent::Removing#remove (method)">#remove</a></span>, <span class='object_link'><a href="SubscribeEvent/Removing.html#remove_channels-instance_method" title="Pubnub::SubscribeEvent::Removing#remove_channels (method)">#remove_channels</a></span>, <span class='object_link'><a href="SubscribeEvent/Removing.html#remove_groups-instance_method" title="Pubnub::SubscribeEvent::Removing#remove_groups (method)">#remove_groups</a></span></p> <h3 class="inherited">Methods included from <span class='object_link'><a href="SubscribeEvent/Adding.html" title="Pubnub::SubscribeEvent::Adding (module)">SubscribeEvent::Adding</a></span></h3> <p class="inherited"><span class='object_link'><a href="SubscribeEvent/Adding.html#add-instance_method" title="Pubnub::SubscribeEvent::Adding#add (method)">#add</a></span>, <span class='object_link'><a href="SubscribeEvent/Adding.html#add_channels-instance_method" title="Pubnub::SubscribeEvent::Adding#add_channels (method)">#add_channels</a></span>, <span class='object_link'><a href="SubscribeEvent/Adding.html#add_groups-instance_method" title="Pubnub::SubscribeEvent::Adding#add_groups (method)">#add_groups</a></span></p> <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Event.html" title="Pubnub::Event (class)">Event</a></span></h3> <p class="inherited"><span class='object_link'><a href="Event.html#finalized%3F-instance_method" title="Pubnub::Event#finalized? (method)">#finalized?</a></span>, <span class='object_link'><a href="Event.html#fire-instance_method" title="Pubnub::Event#fire (method)">#fire</a></span>, <span class='object_link'><a href="Event.html#sync%3F-instance_method" title="Pubnub::Event#sync? (method)">#sync?</a></span>, <span class='object_link'><a href="Event.html#uri-instance_method" title="Pubnub::Event#uri (method)">#uri</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"> - (<tt><span class='object_link'><a href="" title="Pubnub::Presence (class)">Presence</a></span></tt>) <strong>initialize</strong>(options, app) </h3><div class="docstring"> <div class="discussion"> <p>Returns a new instance of Presence</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 8 9 10 11</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/pubnub/events/presence.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_app'>app</span><span class='rparen'>)</span> <span class='ivar'>@event</span> <span class='op'>=</span> <span class='symbol'>:presence</span> <span class='kw'>super</span> <span class='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="format_channels-instance_method"> - (<tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>) <strong>format_channels</strong> </h3><table class="source_code"> <tr> <td> <pre class="lines"> 13 14 15 16</pre> </td> <td> <pre class="code"><span class="info file"># File 'lib/pubnub/events/presence.rb', line 13</span> <span class='kw'>def</span> <span class='id identifier rubyid_format_channels'>format_channels</span> <span class='ivar'>@channel</span> <span class='op'>=</span> <span class='const'>Formatter</span><span class='period'>.</span><span class='id identifier rubyid_format_channel'>format_channel</span><span class='lparen'>(</span><span class='ivar'>@channel</span> <span class='op'>||</span> <span class='ivar'>@channels</span><span class='rparen'>)</span> <span class='ivar'>@channel</span> <span class='op'>=</span> <span class='ivar'>@channel</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-pnpres</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Tue Aug 18 16:02:33 2015 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.7.6 (ruby-2.1.6). </div> </body> </html>