Sha256: abbb42ae7ae24b818749dcdf9d5ab3013cb3bbae1d86af96980ceb9f3e55d3fd

Contents?: true

Size: 1.97 KB

Versions: 3

Compression:

Stored size: 1.97 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>configure (Mu::Scale)</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/mu/api/scale.rb, line 56</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>(<span class="ruby-identifier">param</span>, <span class="ruby-identifier">value</span>)
     <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">param</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;pattern&quot;</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
         <span class="ruby-identifier">value</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">value</span>)
     <span class="ruby-keyword kw">end</span>
     <span class="ruby-ivar">@configuration</span>[<span class="ruby-identifier">param</span>] = <span class="ruby-identifier">value</span>
     <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">&quot;scale_configuration.json&quot;</span>,<span class="ruby-value str">'w'</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-ivar">@configuration</span>))}
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mu-5.7.2.6 rdoc/classes/Mu/Scale.src/M000267.html
mu-5.7.2.5 rdoc/classes/Mu/Scale.src/M000267.html
mu-5.7.2.4 rdoc/classes/Mu/Scale.src/M000267.html