1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
9 — Documentation by YARD
0.8.1
13 <link rel=
"stylesheet" href=
"../css/style.css" type=
"text/css" media=
"screen" charset=
"utf-8" />
15 <link rel=
"stylesheet" href=
"../css/common.css" type=
"text/css" media=
"screen" charset=
"utf-8" />
17 <script type=
"text/javascript" charset=
"utf-8">
18 hasFrames = window.top.frames.main ? true : false;
20 framesUrl = "../frames.html#!" + escape(window.location.href);
24 <script type=
"text/javascript" charset=
"utf-8" src=
"../js/jquery.js"></script>
26 <script type=
"text/javascript" charset=
"utf-8" src=
"../js/app.js"></script>
34 <a href=
"../_index.html">Index (U)
</a> »
35 <span class='title'
><span class='object_link'
><a href=
"../Lyricli.html" title=
"Lyricli (module)">Lyricli
</a></span></span>
37 <span class=
"title">Util
</span>
40 <div class=
"noframes"><span class=
"title">(
</span><a href=
"." target=
"_top">no frames
</a><span class=
"title">)
</span></div>
45 <a class=
"full_list_link" id=
"class_list_link"
46 href=
"../class_list.html">
50 <a class=
"full_list_link" id=
"method_list_link"
51 href=
"../method_list.html">
55 <a class=
"full_list_link" id=
"file_list_link"
56 href=
"../file_list.html">
61 <div class=
"clear"></div>
64 <iframe id=
"search_frame"></iframe>
66 <div id=
"content"><h1>Module: Lyricli::Util
80 <dt class=
"r1">Included in:
</dt>
81 <dd class=
"r1"><span class='object_link'
><a href=
"LyricsEngine.html" title=
"Lyricli::LyricsEngine (class)">LyricsEngine
</a></span>,
<span class='object_link'
><a href=
"SourceManager.html" title=
"Lyricli::SourceManager (class)">SourceManager
</a></span></dd>
85 <dt class=
"r2 last">Defined in:
</dt>
86 <dd class=
"r2 last">lib/lyricli/util.rb
</dd>
89 <div class=
"clear"></div>
100 Instance Method Summary
101 <small>(
<a href=
"#" class=
"summary_toggle">collapse
</a>)
</small>
107 <span class=
"summary_signature">
109 <a href=
"#camelize-instance_method" title=
"#camelize (instance method)">- (Object)
<strong>camelize
</strong>(str)
</a>
123 <span class=
"summary_desc"><div class='inline'
></div></span>
129 <span class=
"summary_signature">
131 <a href=
"#parse_class-instance_method" title=
"#parse_class (instance method)">- (Object)
<strong>parse_class
</strong>(class_name)
</a>
145 <span class=
"summary_desc"><div class='inline'
></div></span>
151 <span class=
"summary_signature">
153 <a href=
"#sanitize_param-instance_method" title=
"#sanitize_param (instance method)">- (Object)
<strong>sanitize_param
</strong>(p)
</a>
167 <span class=
"summary_desc"><div class='inline'
></div></span>
177 <div id=
"instance_method_details" class=
"method_details_list">
178 <h2>Instance Method Details
</h2>
181 <div class=
"method_details first">
182 <h3 class=
"signature first" id=
"camelize-instance_method">
184 - (
<tt>Object
</tt>)
<strong>camelize
</strong>(str)
190 </h3><table class=
"source_code">
201 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/util.rb', line
3</span>
203 <span class='kw'
>def
</span> <span class='id identifier rubyid_camelize'
>camelize
</span><span class='lparen'
>(
</span><span class='id identifier rubyid_str'
>str
</span><span class='rparen'
>)
</span>
204 <span class='id identifier rubyid_str'
>str
</span><span class='period'
>.
</span><span class='id identifier rubyid_split'
>split
</span><span class='lparen'
>(
</span><span class='tstring'
><span class='tstring_beg'
>'
</span><span class='tstring_content'
>_
</span><span class='tstring_end'
>'
</span></span><span class='rparen'
>)
</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_w'
>w
</span><span class='op'
>|
</span> <span class='id identifier rubyid_w'
>w
</span><span class='period'
>.
</span><span class='id identifier rubyid_capitalize'
>capitalize
</span><span class='rbrace'
>}
</span><span class='period'
>.
</span><span class='id identifier rubyid_join'
>join
</span>
205 <span class='kw'
>end
</span></pre>
211 <div class=
"method_details ">
212 <h3 class=
"signature " id=
"parse_class-instance_method">
214 - (
<tt>Object
</tt>)
<strong>parse_class
</strong>(class_name)
220 </h3><table class=
"source_code">
236 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/util.rb', line
7</span>
238 <span class='kw'
>def
</span> <span class='id identifier rubyid_parse_class'
>parse_class
</span><span class='lparen'
>(
</span><span class='id identifier rubyid_class_name'
>class_name
</span><span class='rparen'
>)
</span>
239 <span class='kw'
>begin
</span>
240 <span class='id identifier rubyid_path'
>path
</span> <span class='op'
>=
</span> <span class='tstring'
><span class='tstring_beg'
>"</span><span class='tstring_content'
>Sources::
</span><span class='embexpr_beg'
>#{
</span><span class='id identifier rubyid_class_name'
>class_name
</span><span class='rbrace'
>}
</span><span class='tstring_end'
>"</span></span>
241 <span class='kw'
>return
</span> <span class='id identifier rubyid_eval'
>eval
</span><span class='lparen'
>(
</span><span class='id identifier rubyid_path'
>path
</span><span class='rparen'
>)
</span>
242 <span class='kw'
>rescue
</span> <span class='const'
>NameError
</span>
243 <span class='kw'
>return
</span> <span class='kw'
>nil
</span>
244 <span class='kw'
>end
</span>
245 <span class='kw'
>end
</span></pre>
251 <div class=
"method_details ">
252 <h3 class=
"signature " id=
"sanitize_param-instance_method">
254 - (
<tt>Object
</tt>)
<strong>sanitize_param
</strong>(p)
260 </h3><table class=
"source_code">
271 <pre class=
"code"><span class=
"info file"># File 'lib/lyricli/util.rb', line
16</span>
273 <span class='kw'
>def
</span> <span class='id identifier rubyid_sanitize_param'
>sanitize_param
</span><span class='lparen'
>(
</span><span class='id identifier rubyid_p'
>p
</span><span class='rparen'
>)
</span>
274 <span class='const'
>URI
</span><span class='period'
>.
</span><span class='id identifier rubyid_encode_www_form_component'
>encode_www_form_component
</span><span class='lparen'
>(
</span><span class='id identifier rubyid_p'
>p
</span><span class='period'
>.
</span><span class='id identifier rubyid_gsub'
>gsub
</span><span class='lparen'
>(
</span><span class='tstring'
><span class='regexp_beg'
>/
</span><span class='tstring_content'
> </span><span class='regexp_end'
>/
</span></span><span class='comma'
>,
</span> <span class='tstring'
><span class='tstring_beg'
>"</span><span class='tstring_content'
>+
</span><span class='tstring_end'
>"</span></span><span class='rparen'
>)
</span><span class='rparen'
>)
</span><span class='period'
>.
</span><span class='id identifier rubyid_gsub'
>gsub
</span><span class='lparen'
>(
</span><span class='tstring'
><span class='tstring_beg'
>"</span><span class='tstring_content'
>%
2B
</span><span class='tstring_end'
>"</span></span><span class='comma'
>,
</span> <span class='tstring'
><span class='tstring_beg'
>"</span><span class='tstring_content'
>+
</span><span class='tstring_end'
>"</span></span><span class='rparen'
>)
</span>
275 <span class='kw'
>end
</span></pre>
286 Generated on Fri Oct
5 22:
31:
14 2012 by
287 <a href=
"http://yardoc.org" title=
"Yay! A Ruby Documentation Tool" target=
"_parent">yard
</a>