Skip to content

Commit

Permalink
WiP: Update ruby docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsvensson committed Mar 17, 2016
1 parent 34c76bc commit af9590f
Show file tree
Hide file tree
Showing 254 changed files with 51,596 additions and 101 deletions.
14 changes: 14 additions & 0 deletions src/clients/lib/ruby/.yardoc/checksums
@@ -0,0 +1,14 @@
async.rb ba967bf49824bea5e096c0594e079cbcd236d889
rb_collection.c f6116f8422d4d35094f5b011ad5eb8dcf0dfa542
rb_collection.h 1fc25c5878c2e6c1543b750c3894863bb3e69af8
rb_playlist.c 09a39cd2c58fd56d451eafe3dd5f05b0f38e9381
rb_playlist.h 8be787cc7f4a9e889ed9ece89dc15fb0c4fdbc63
rb_result.c 38a0fc799557694d42b4df98ecea76810235c536
rb_result.h 5dc69d213fd95f929fdf50e8d28e9dafa57c3802
rb_xmmsclient.c d1684ca5b02cf4943d0524625c33825708d3f51f
rb_xmmsclient_ecore.c de8108ed430dac27e5323a31464fb177e0da7cad
rb_xmmsclient_glib.c 0b48ccb9903a38f5701233cd52e49994ab5d6439
rb_xmmsclient.h bb3a22855f30d7a2f04e2640a54342b0e1ae97f2
rb_xmmsclient_main.c 1056eba3db3c1b5fafa5bd93e97b96df225d60db
sync.rb f3c2fb0486455382821e7473892b021f9b829556
xmmsclient.rb b926424354004c479daea960790c911b1863d8cb
Binary file added src/clients/lib/ruby/.yardoc/object_types
Binary file not shown.
Binary file added src/clients/lib/ruby/.yardoc/objects/root.dat
Binary file not shown.
Binary file added src/clients/lib/ruby/.yardoc/proxy_types
Binary file not shown.
96 changes: 49 additions & 47 deletions src/clients/lib/ruby/async.rb
Expand Up @@ -15,65 +15,67 @@

require 'xmmsclient'

class Xmms::Client::Async
attr_reader(:real)
module Xmms
class Client::Async
attr_reader(:real)

def initialize(name)
@real = Xmms::Client.new(name)
end
def initialize(name)
@real = Xmms::Client.new(name)
end

def method_missing(id, *args, &block)
args.push(&block) if(id == 'on_disconnect')
ret = @real.send(id, *args)
if(block_given? && (ret.is_a?(Xmms::Result) ||
ret.is_a?(Xmms::BroadcastResult) || ret.is_a?(Xmms::SignalResult)))
ret.notifier(&block)
elsif(ret.is_a?(Xmms::Client))
self
elsif(ret.is_a?(Xmms::Collection))
Xmms::Collection::Async.new(ret)
elsif(ret.is_a?(Xmms::Playlist))
Xmms::Playlist::Async.new(ret)
else
ret
def method_missing(id, *args, &block)
args.push(&block) if(id == 'on_disconnect')
ret = @real.send(id, *args)
if(block_given? && (ret.is_a?(Xmms::Result) ||
ret.is_a?(Xmms::BroadcastResult) || ret.is_a?(Xmms::SignalResult)))
ret.notifier(&block)
elsif(ret.is_a?(Xmms::Client))
self
elsif(ret.is_a?(Xmms::Collection))
Xmms::Collection::Async.new(ret)
elsif(ret.is_a?(Xmms::Playlist))
Xmms::Playlist::Async.new(ret)
else
ret
end
end
end
end

class Xmms::Collection::Async
attr_reader(:real)
class Collection::Async
attr_reader(:real)

def initialize(coll)
@real = coll
end
def initialize(coll)
@real = coll
end

def method_missing(id, *args, &block)
ret = @real.send(id, *args)
if(block_given? && ret.is_a?(Xmms::Result))
ret.notifier(&block)
elsif(ret.is_a?(Xmms::Collection))
self
else
ret
def method_missing(id, *args, &block)
ret = @real.send(id, *args)
if(block_given? && ret.is_a?(Xmms::Result))
ret.notifier(&block)
elsif(ret.is_a?(Xmms::Collection))
self
else
ret
end
end
end
end

class Xmms::Playlist::Async
attr_reader(:real)
class Playlist::Async
attr_reader(:real)

def initialize(plist)
@real = plist
end
def initialize(plist)
@real = plist
end

def method_missing(id, *args, &block)
ret = @real.send(id, *args)
if(block_given? && ret.is_a?(Xmms::Result))
ret.notifier(&block)
elsif(ret.is_a?(Xmms::Collection))
self
else
ret
def method_missing(id, *args, &block)
ret = @real.send(id, *args)
if(block_given? && ret.is_a?(Xmms::Result))
ret.notifier(&block)
elsif(ret.is_a?(Xmms::Collection))
self
else
ret
end
end
end
end
232 changes: 232 additions & 0 deletions src/clients/lib/ruby/doc/Xmms.html
@@ -0,0 +1,232 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>module Xmms - RDoc Documentation</title>

<script type="text/javascript">
var rdoc_rel_prefix = "./";
</script>

<script src="./js/jquery.js"></script>
<script src="./js/darkfish.js"></script>

<link href="./css/fonts.css" rel="stylesheet">
<link href="./css/rdoc.css" rel="stylesheet">



<body id="top" role="document" class="module">
<nav role="navigation">
<div id="project-navigation">
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
<h2>
<a href="./index.html" rel="home">Home</a>
</h2>

<div id="table-of-contents-navigation">
<a href="./table_of_contents.html#pages">Pages</a>
<a href="./table_of_contents.html#classes">Classes</a>
<a href="./table_of_contents.html#methods">Methods</a>
</div>
</div>

<div id="search-section" role="search" class="project-section initially-hidden">
<form action="#" method="get" accept-charset="utf-8">
<div id="search-field-wrapper">
<input id="search-field" role="combobox" aria-label="Search"
aria-autocomplete="list" aria-controls="search-results"
type="text" name="search" placeholder="Search" spellcheck="false"
title="Type to search, Up and Down to navigate, Enter to load">
</div>

<ul id="search-results" aria-label="Search Results"
aria-busy="false" aria-expanded="false"
aria-atomic="false" class="initially-hidden"></ul>
</form>
</div>

</div>



<div id="class-metadata">




<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
<h3>Methods</h3>

<ul class="link-list" role="directory">

<li ><a href="#method-c-decode_url">::decode_url</a>

<li ><a href="#method-c-userconfdir">::userconfdir</a>

</ul>
</div>

</div>
</nav>

<main role="main" aria-labelledby="module-Xmms">
<h1 id="module-Xmms" class="module">
module Xmms
</h1>

<section class="description">

</section>




<section id="5Buntitled-5D" class="documentation-section">





<section class="constants-list">
<header>
<h3>Constants</h3>
</header>
<dl>

<dt id="VERSION">VERSION

<dd>


</dl>
</section>





<section id="public-class-5Buntitled-5D-method-details" class="method-section">
<header>
<h3>Public Class Methods</h3>
</header>


<div id="method-c-decode_url" class="method-detail ">


<div class="method-heading">
<span class="method-callseq">
decode_url(url) &rarr; String
</span>

<span class="method-click-advice">click to toggle source</span>

</div>



<div class="method-description">

<p>Decodes a url-encoded string <em>url</em> and returns it in UNKNOWN
ENCODING. Use with caution.</p>




<div class="method-source-code" id="decode_url-source">
<pre>static VALUE
m_decode_url (VALUE self, VALUE str)
{
const unsigned char *burl;
unsigned int blen;
xmmsv_t *strv, *decoded;
VALUE url = Qnil;

strv = xmmsv_new_string (StringValuePtr (str));

decoded = xmmsv_decode_url (strv);

if (!decoded)
goto out;

if (!xmmsv_get_bin (decoded, &amp;burl, &amp;blen))
goto out;

url = rb_str_new ((char *) burl, blen);

out:
if (decoded)
xmmsv_unref (decoded);

xmmsv_unref (strv);

return url;
}</pre>
</div>

</div>




</div>


<div id="method-c-userconfdir" class="method-detail ">


<div class="method-heading">
<span class="method-callseq">
userconfdir &rarr; String
</span>

<span class="method-click-advice">click to toggle source</span>

</div>



<div class="method-description">

<p>Returns the xmms2 configuration directory for the current user.</p>




<div class="method-source-code" id="userconfdir-source">
<pre>static VALUE
m_userconfdir_get (VALUE self)
{
const char *p;
char path[XMMS_PATH_MAX];

p = xmmsc_userconfdir_get (path, XMMS_PATH_MAX);

return p ? rb_str_new2 (p) : Qnil;
}</pre>
</div>

</div>




</div>


</section>

</section>
</main>


<footer id="validator-badges" role="contentinfo">
<p><a href="http://validator.w3.org/check/referer">Validate</a>
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>

0 comments on commit af9590f

Please sign in to comment.