Sha256: 6264b5ef1273ceb88ae0f23eb44b2019a35ef474b93775c3a61d094a4640a2d9
Contents?: true
Size: 1.7 KB
Versions: 1
Compression:
Stored size: 1.7 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>add_component (Icalendar::Component)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 54</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_component</span>(<span class="ruby-identifier">component</span>) <span class="ruby-identifier">key</span> = (<span class="ruby-identifier">component</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'s'</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'icalendar::'</span>, <span class="ruby-value str">''</span>).<span class="ruby-identifier">to_sym</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@components</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">key</span> <span class="ruby-ivar">@components</span>[<span class="ruby-identifier">key</span>] = [] <span class="ruby-keyword kw">end</span> <span class="ruby-ivar">@components</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">component</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
icalendar-0.98 | docs/api/classes/Icalendar/Component.src/M000030.html |