timcolonel/rails_embed_editor

View on GitHub
doc/doc/RailsEmbedEditor/FileManager_html.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>

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

<title>FileManager.html - RDoc Documentation</title>

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

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

<script src="../../js/jquery.js"></script>
<script src="../../js/navigation.js"></script>
<script src="../../js/search_index.js"></script>
<script src="../../js/search.js"></script>
<script src="../../js/searcher.js"></script>
<script src="../../js/darkfish.js"></script>


<body id="top" role="document" class="file">
<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="project-metadata">
    <div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
  
    <li><a href="../../Gemfile.html">Gemfile</a>
  
    <li><a href="../../Gemfile_lock.html">Gemfile.lock</a>
  
    <li><a href="../../LICENSE.html">LICENSE</a>
  
    <li><a href="../../MIT-LICENSE.html">MIT-LICENSE</a>
  
    <li><a href="../../README_md.html">README</a>
  
    <li><a href="../../README_rdoc.html">README</a>
  
    <li><a href="../../Rakefile.html">Rakefile</a>
  
    <li><a href="../../app/assets/javascripts/rails_embed_editor/application_coffee.html">application.coffee</a>
  
    <li><a href="../../app/assets/stylesheets/rails_embed_editor/application_scss.html">application.scss</a>
  
    <li><a href="../../doc/ActiveSupport_html.html">ActiveSupport.html</a>
  
    <li><a href="../../doc/ApplicationController_html.html">ApplicationController.html</a>
  
    <li><a href="../../doc/ApplicationHelper_html.html">ApplicationHelper.html</a>
  
    <li><a href="../../doc/ConfigTest_html.html">ConfigTest.html</a>
  
    <li><a href="../../doc/Dummy_html.html">Dummy.html</a>
  
    <li><a href="../../doc/Dummy/Application_html.html">Application.html</a>
  
    <li><a href="../../doc/EditorControllerTest_html.html">EditorControllerTest.html</a>
  
    <li><a href="../../doc/FileManagerTest_html.html">FileManagerTest.html</a>
  
    <li><a href="../../doc/Gemfile_html.html">Gemfile.html</a>
  
    <li><a href="../../doc/Gemfile_lock_html.html">Gemfile_lock.html</a>
  
    <li><a href="../../doc/LICENSE_html.html">LICENSE.html</a>
  
    <li><a href="../../doc/Logger_html.html">Logger.html</a>
  
    <li><a href="../../doc/MIT-LICENSE_html.html">MIT-LICENSE.html</a>
  
    <li><a href="../../doc/NavigationTest_html.html">NavigationTest.html</a>
  
    <li><a href="../../doc/Object_html.html">Object.html</a>
  
    <li><a href="../../doc/README_md_html.html">README_md.html</a>
  
    <li><a href="../../doc/README_rdoc_html.html">README_rdoc.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor_html.html">RailsEmbedEditor.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/ApplicationController_html.html">ApplicationController.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/ApplicationHelper_html.html">ApplicationHelper.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/Config_html.html">Config.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/EditorController_html.html">EditorController.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/EditorMode_html.html">EditorMode.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/Engine_html.html">Engine.html</a>
  
    <li><a href="../../doc/RailsEmbedEditor/FileManager_html.html">FileManager.html</a>
  
    <li><a href="../../doc/RailsEmbedEditorTest_html.html">RailsEmbedEditorTest.html</a>
  
    <li><a href="../../doc/Rakefile_html.html">Rakefile.html</a>
  
    <li><a href="../../doc/app/assets/javascripts/rails_embed_editor/application_coffee_html.html">application_coffee.html</a>
  
    <li><a href="../../doc/app/assets/stylesheets/rails_embed_editor/application_scss_html.html">application_scss.html</a>
  
    <li><a href="../../doc/fonts_css.html">fonts.css</a>
  
    <li><a href="../../doc/gemfiles/Gemfile_rails-4_0_x_html.html">Gemfile_rails-4_0_x.html</a>
  
    <li><a href="../../doc/index_html.html">index.html</a>
  
    <li><a href="../../doc/js/darkfish_js.html">darkfish.js</a>
  
    <li><a href="../../doc/js/jquery_js.html">jquery.js</a>
  
    <li><a href="../../doc/js/navigation_js.html">navigation.js</a>
  
    <li><a href="../../doc/js/search_js.html">search.js</a>
  
    <li><a href="../../doc/js/search_index_js.html">search_index.js</a>
  
    <li><a href="../../doc/js/searcher_js.html">searcher.js</a>
  
    <li><a href="../../doc/lib/tasks/rails_embed_editor_tasks_rake_html.html">rails_embed_editor_tasks_rake.html</a>
  
    <li><a href="../../doc/rails_embed_editor_gemspec_html.html">rails_embed_editor_gemspec.html</a>
  
    <li><a href="../../doc/rdoc_css.html">rdoc.css</a>
  
    <li><a href="../../doc/table_of_contents_html.html">table_of_contents.html</a>
  
    <li><a href="../../doc/test/dummy/README_rdoc_html.html">README_rdoc.html</a>
  
    <li><a href="../../doc/test/dummy/Rakefile_html.html">Rakefile.html</a>
  
    <li><a href="../../doc/test/dummy/app/assets/javascripts/application_js_html.html">application_js.html</a>
  
    <li><a href="../../doc/test/dummy/app/assets/stylesheets/application_css_html.html">application_css.html</a>
  
    <li><a href="../../doc/test/dummy/config_ru_html.html">config_ru.html</a>
  
    <li><a href="../../doc/test/dummy/db/test_sqlite3_html.html">test_sqlite3.html</a>
  
    <li><a href="../../doc/test/dummy/log/development_log_html.html">development_log.html</a>
  
    <li><a href="../../doc/test/dummy/log/test_log_html.html">test_log.html</a>
  
    <li><a href="../../doc/test/dummy/public/404_html_html.html">404_html.html</a>
  
    <li><a href="../../doc/test/dummy/public/422_html_html.html">422_html.html</a>
  
    <li><a href="../../doc/test/dummy/public/500_html_html.html">500_html.html</a>
  
    <li><a href="../../doc/test/dummy/public/favicon_ico_html.html">favicon_ico.html</a>
  
    <li><a href="../../gemfiles/Gemfile_rails-4_0_x.html">Gemfile.rails-4.0.x</a>
  
    <li><a href="../../lib/tasks/rails_embed_editor_tasks_rake.html">rails_embed_editor_tasks.rake</a>
  
    <li><a href="../../rails_embed_editor_gemspec.html">rails_embed_editor.gemspec</a>
  
    <li><a href="../../test/dummy/README_rdoc.html">README</a>
  
    <li><a href="../../test/dummy/Rakefile.html">Rakefile</a>
  
    <li><a href="../../test/dummy/app/assets/javascripts/application_js.html">application.js</a>
  
    <li><a href="../../test/dummy/app/assets/stylesheets/application_css.html">application.css</a>
  
    <li><a href="../../test/dummy/config_ru.html">config.ru</a>
  
    <li><a href="../../test/dummy/db/test_sqlite3.html">test.sqlite3</a>
  
    <li><a href="../../test/dummy/log/development_log.html">development.log</a>
  
    <li><a href="../../test/dummy/log/test_log.html">test.log</a>
  
    <li><a href="../../test/dummy/public/404_html.html">404.html</a>
  
    <li><a href="../../test/dummy/public/422_html.html">422.html</a>
  
    <li><a href="../../test/dummy/public/500_html.html">500.html</a>
  
    <li><a href="../../test/dummy/public/favicon_ico.html">favicon.ico</a>
  
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-label="Page doc/RailsEmbedEditor/FileManager.html">

<p>&lt;!DOCTYPE html&gt;</p>

<p>&lt;html&gt; &lt;head&gt; &lt;meta charset=“UTF-8”&gt;</p>

<p>&lt;title&gt;class <a
href="../../RailsEmbedEditor/FileManager.html">RailsEmbedEditor::FileManager</a>
- RDoc Documentation&lt;/title&gt;</p>

<p>&lt;link href=“../fonts.css” rel=“stylesheet”&gt; &lt;link
href=“../rdoc.css” rel=“stylesheet”&gt;</p>

<p>&lt;script type=“text/javascript”&gt;</p>

<pre>var rdoc_rel_prefix = &quot;../&quot;;</pre>

<p>&lt;/script&gt;</p>

<p>&lt;script src=“../js/jquery.js”&gt;&lt;/script&gt; &lt;script
src=“../js/navigation.js”&gt;&lt;/script&gt; &lt;script
src=“../js/search_index.js”&gt;&lt;/script&gt; &lt;script
src=“../js/search.js”&gt;&lt;/script&gt; &lt;script
src=“../js/searcher.js”&gt;&lt;/script&gt; &lt;script
src=“../js/darkfish.js”&gt;&lt;/script&gt;</p>

<p>&lt;body id=“top” role=“document” class=“class”&gt; &lt;nav
role=“navigation”&gt;</p>

<pre>&lt;div id=&quot;project-navigation&quot;&gt;
  &lt;div id=&quot;home-section&quot; role=&quot;region&quot; title=&quot;Quick navigation&quot; class=&quot;nav-section&quot;&gt;
&lt;h2&gt;
  &lt;a href=&quot;../index.html&quot; rel=&quot;home&quot;&gt;Home&lt;/a&gt;
&lt;/h2&gt;

&lt;div id=&quot;table-of-contents-navigation&quot;&gt;
  &lt;a href=&quot;../table_of_contents.html#pages&quot;&gt;Pages&lt;/a&gt;
  &lt;a href=&quot;../table_of_contents.html#classes&quot;&gt;Classes&lt;/a&gt;
  &lt;a href=&quot;../table_of_contents.html#methods&quot;&gt;Methods&lt;/a&gt;
&lt;/div&gt;</pre>

<p>&lt;/div&gt;</p>

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

  &lt;ul id=&quot;search-results&quot; aria-label=&quot;Search Results&quot;
      aria-busy=&quot;false&quot; aria-expanded=&quot;false&quot;
      aria-atomic=&quot;false&quot; class=&quot;initially-hidden&quot;&gt;&lt;/ul&gt;
&lt;/form&gt;</pre>

<p>&lt;/div&gt;</p>

<pre>&lt;/div&gt;

&lt;div id=&quot;class-metadata&quot;&gt;

  &lt;div id=&quot;parent-class-section&quot; class=&quot;nav-section&quot;&gt;
&lt;h3&gt;Parent&lt;/h3&gt;

&lt;p class=&quot;link&quot;&gt;&lt;a href=&quot;../Object.html&quot;&gt;Object&lt;/a&gt;</pre>

<p>&lt;/div&gt;</p>

<pre>&lt;!-- Method Quickref --&gt;</pre>

<p>&lt;div id=“method-list-section” class=“nav-section”&gt;</p>

<pre>&lt;h3&gt;Methods&lt;/h3&gt;

&lt;ul class=&quot;link-list&quot; role=&quot;directory&quot;&gt;

  &lt;li &gt;&lt;a href=&quot;#method-c-from_around&quot;&gt;::from_around&lt;/a&gt;

  &lt;li &gt;&lt;a href=&quot;#method-c-from_options&quot;&gt;::from_options&lt;/a&gt;

  &lt;li &gt;&lt;a href=&quot;#method-c-new&quot;&gt;::new&lt;/a&gt;

  &lt;li &gt;&lt;a href=&quot;#method-i-read_lines&quot;&gt;#read_lines&lt;/a&gt;

  &lt;li &gt;&lt;a href=&quot;#method-i-read_text&quot;&gt;#read_text&lt;/a&gt;

  &lt;li &gt;&lt;a href=&quot;#method-i-save_lines&quot;&gt;#save_lines&lt;/a&gt;

  &lt;li &gt;&lt;a href=&quot;#method-i-save_text&quot;&gt;#save_text&lt;/a&gt;

&lt;/ul&gt;</pre>

<p>&lt;/div&gt;</p>

<pre>&lt;/div&gt;</pre>

<p>&lt;/nav&gt;</p>

<p>&lt;main role=“main”
aria-labelledby=“class-RailsEmbedEditor::FileManager”&gt;</p>

<pre class="ruby"><span class="ruby-operator">&lt;</span><span class="ruby-identifier">h1</span> <span class="ruby-identifier">id</span>=<span class="ruby-string">&quot;class-RailsEmbedEditor::FileManager&quot;</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;class&quot;</span><span class="ruby-operator">&gt;</span>
  <span class="ruby-keyword">class</span> <span class="ruby-constant">RailsEmbedEditor</span><span class="ruby-operator">::</span><span class="ruby-constant">FileManager</span>
<span class="ruby-operator">&lt;</span><span class="ruby-regexp">/h1&gt;

&lt;section class=&quot;description&quot;&gt;

&lt;/se</span><span class="ruby-identifier">ction</span><span class="ruby-operator">&gt;</span>

<span class="ruby-operator">&lt;</span><span class="ruby-identifier">section</span> <span class="ruby-identifier">id</span>=<span class="ruby-string">&quot;5Buntitled-5D&quot;</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;documentation-section&quot;</span><span class="ruby-operator">&gt;</span>

  <span class="ruby-operator">&lt;</span><span class="ruby-identifier">section</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;attribute-method-details&quot;</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;method-section&quot;</span><span class="ruby-operator">&gt;</span>
    <span class="ruby-operator">&lt;</span><span class="ruby-identifier">header</span><span class="ruby-operator">&gt;</span>
      <span class="ruby-operator">&lt;</span><span class="ruby-identifier">h3</span><span class="ruby-operator">&gt;</span><span class="ruby-constant">Attributes</span><span class="ruby-operator">&lt;</span><span class="ruby-regexp">/h3&gt;
    &lt;/</span><span class="ruby-identifier">header</span><span class="ruby-operator">&gt;</span>

    <span class="ruby-operator">&lt;</span><span class="ruby-identifier">div</span> <span class="ruby-identifier">id</span>=<span class="ruby-string">&quot;attribute-i-first_line&quot;</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;method-detail&quot;</span><span class="ruby-operator">&gt;</span>
      <span class="ruby-operator">&lt;</span><span class="ruby-identifier">div</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;method-heading attribute-method-heading&quot;</span><span class="ruby-operator">&gt;</span>
        <span class="ruby-operator">&lt;</span><span class="ruby-identifier">span</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;method-name&quot;</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">first_line</span><span class="ruby-operator">&lt;</span><span class="ruby-regexp">/span&gt;&lt;span
          class=&quot;attribute-access-type&quot;&gt;[RW]&lt;/s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">&gt;</span>
      <span class="ruby-operator">&lt;</span><span class="ruby-regexp">/div&gt;

      &lt;div class=&quot;method-description&quot;&gt;

      &lt;/</span><span class="ruby-identifier">div</span><span class="ruby-operator">&gt;</span>
    <span class="ruby-operator">&lt;</span><span class="ruby-regexp">/div&gt;

    &lt;div id=&quot;attribute-i-last_line&quot; class=&quot;method-detail&quot;&gt;
      &lt;div class=&quot;method-heading attribute-method-heading&quot;&gt;
        &lt;span class=&quot;method-name&quot;&gt;last_line&lt;/s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">&gt;</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">span</span>
          <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;attribute-access-type&quot;</span><span class="ruby-operator">&gt;</span>[<span class="ruby-constant">RW</span>]<span class="ruby-operator">&lt;</span><span class="ruby-regexp">/span&gt;
      &lt;/</span><span class="ruby-identifier">div</span><span class="ruby-operator">&gt;</span>

      <span class="ruby-operator">&lt;</span><span class="ruby-identifier">div</span> <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;method-description&quot;</span><span class="ruby-operator">&gt;</span>

      <span class="ruby-operator">&lt;</span><span class="ruby-regexp">/div&gt;
    &lt;/</span><span class="ruby-identifier">div</span><span class="ruby-operator">&gt;</span>

  <span class="ruby-operator">&lt;</span><span class="ruby-regexp">/section&gt;

   &lt;section id=&quot;public-class-5Buntitled-5D-method-details&quot; class=&quot;method-section&quot;&gt;
     &lt;header&gt;
       &lt;h3&gt;Public Class Methods&lt;/</span><span class="ruby-identifier">h3</span><span class="ruby-operator">&gt;</span>
     <span class="ruby-operator">&lt;</span><span class="ruby-regexp">/header&gt;

    &lt;div id=&quot;method-c-from_around&quot; class=&quot;method-detail &quot;&gt;

      &lt;div class=&quot;method-heading&quot;&gt;
        &lt;span class=&quot;method-name&quot;&gt;from_around&lt;/s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">&gt;</span><span class="ruby-operator">&lt;</span><span class="ruby-identifier">span</span>
          <span class="ruby-identifier">class</span>=<span class="ruby-string">&quot;method-args&quot;</span><span class="ruby-operator">&gt;</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">radius</span>=<span class="ruby-value">2</span>)<span class="ruby-operator">&lt;</span><span class="ruby-regexp">/span&gt;

        &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/s</span><span class="ruby-identifier">pan</span><span class="ruby-operator">&gt;</span>

      <span class="ruby-operator">&lt;</span><span class="ruby-node">/div&gt;

      &lt;div class=&quot;method-description&quot;&gt;

        &lt;div class=&quot;method-source-code&quot; id=&quot;from_around-source&quot;&gt;
          &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/</span><span class="ruby-identifier">rails_embed_editor</span><span class="ruby-operator">/</span><span class="ruby-identifier">file_manager</span>.<span class="ruby-identifier">rb</span>, <span class="ruby-identifier">line</span> <span class="ruby-value">19</span><span class="ruby-operator">&lt;</span><span class="ruby-regexp">/span&gt;
</span></pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-keyword”&gt;self&lt;/span&gt;.&lt;span
class=“ruby-identifier”&gt;from_around&lt;/span&gt;(&lt;span
class=“ruby-identifier”&gt;filename&lt;/span&gt;, &lt;span
class=“ruby-identifier”&gt;line&lt;/span&gt;, &lt;span
class=“ruby-identifier”&gt;radius&lt;/span&gt;=&lt;span
class=“ruby-value”&gt;2&lt;/span&gt;)</p>

<pre>&lt;span class=&quot;ruby-identifier&quot;&gt;first_line&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;line&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;radius&lt;/span&gt;
&lt;span class=&quot;ruby-identifier&quot;&gt;last_line&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;line&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;radius&lt;/span&gt;
&lt;span class=&quot;ruby-constant&quot;&gt;RailsEmbedEditor&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ruby-constant&quot;&gt;FileManager&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;filename&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;first_line&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;last_line&lt;/span&gt;)</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>    &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;method-c-from_options&quot; class=&quot;method-detail &quot;&gt;

  &lt;div class=&quot;method-heading&quot;&gt;
    &lt;span class=&quot;method-name&quot;&gt;from_options&lt;/span&gt;&lt;span
      class=&quot;method-args&quot;&gt;(filename, options)&lt;/span&gt;

    &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/span&gt;

  &lt;/div&gt;

  &lt;div class=&quot;method-description&quot;&gt;

    &lt;div class=&quot;method-source-code&quot; id=&quot;from_options-source&quot;&gt;
      &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/rails_embed_editor/file_manager.rb, line 11&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-keyword”&gt;self&lt;/span&gt;.&lt;span
class=“ruby-identifier”&gt;from_options&lt;/span&gt;(&lt;span
class=“ruby-identifier”&gt;filename&lt;/span&gt;, &lt;span
class=“ruby-identifier”&gt;options&lt;/span&gt;)</p>

<pre>&lt;span class=&quot;ruby-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;:first_line&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;nil?&lt;/span&gt;
  &lt;span class=&quot;ruby-identifier&quot;&gt;from_around&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;filename&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;:line&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;to_i&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;:radius&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;to_i&lt;/span&gt;)
&lt;span class=&quot;ruby-keyword&quot;&gt;else&lt;/span&gt;
  &lt;span class=&quot;ruby-constant&quot;&gt;RailsEmbedEditor&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ruby-constant&quot;&gt;FileManager&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;new&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;filename&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;:first_line&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;to_i&lt;/span&gt;, &lt;span class=&quot;ruby-identifier&quot;&gt;options&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;:last_line&lt;/span&gt;].&lt;span class=&quot;ruby-identifier&quot;&gt;to_i&lt;/span&gt;)
&lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>    &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;method-c-new&quot; class=&quot;method-detail &quot;&gt;

  &lt;div class=&quot;method-heading&quot;&gt;
    &lt;span class=&quot;method-name&quot;&gt;new&lt;/span&gt;&lt;span
      class=&quot;method-args&quot;&gt;(filename, first_line = nil, last_line=nil)&lt;/span&gt;

    &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/span&gt;

  &lt;/div&gt;

  &lt;div class=&quot;method-description&quot;&gt;

    &lt;div class=&quot;method-source-code&quot; id=&quot;new-source&quot;&gt;
      &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/rails_embed_editor/file_manager.rb, line 5&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-identifier”&gt;initialize&lt;/span&gt;(&lt;span
class=“ruby-identifier”&gt;filename&lt;/span&gt;, &lt;span
class=“ruby-identifier”&gt;first_line&lt;/span&gt; = &lt;span
class=“ruby-keyword”&gt;nil&lt;/span&gt;, &lt;span
class=“ruby-identifier”&gt;last_line&lt;/span&gt;=&lt;span
class=“ruby-keyword”&gt;nil&lt;/span&gt;)</p>

<pre>&lt;span class=&quot;ruby-ivar&quot;&gt;@filename&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;filename&lt;/span&gt;
&lt;span class=&quot;ruby-ivar&quot;&gt;@first_line&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;first_line&lt;/span&gt;
&lt;span class=&quot;ruby-ivar&quot;&gt;@last_line&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;last_line&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>      &lt;/div&gt;

    &lt;/div&gt;

  &lt;/div&gt;

&lt;/section&gt;

 &lt;section id=&quot;public-instance-5Buntitled-5D-method-details&quot; class=&quot;method-section&quot;&gt;
   &lt;header&gt;
     &lt;h3&gt;Public Instance Methods&lt;/h3&gt;
   &lt;/header&gt;

  &lt;div id=&quot;method-i-read_lines&quot; class=&quot;method-detail &quot;&gt;

    &lt;div class=&quot;method-heading&quot;&gt;
      &lt;span class=&quot;method-name&quot;&gt;read_lines&lt;/span&gt;&lt;span
        class=&quot;method-args&quot;&gt;()&lt;/span&gt;

      &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/span&gt;

    &lt;/div&gt;

    &lt;div class=&quot;method-description&quot;&gt;

      &lt;div class=&quot;method-source-code&quot; id=&quot;read_lines-source&quot;&gt;
        &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/rails_embed_editor/file_manager.rb, line 25&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-identifier”&gt;read_lines&lt;/span&gt;</p>

<pre>&lt;span class=&quot;ruby-identifier&quot;&gt;lines&lt;/span&gt; = []
&lt;span class=&quot;ruby-constant&quot;&gt;File&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@filename&lt;/span&gt;, &lt;span class=&quot;ruby-string&quot;&gt;'r'&lt;/span&gt;) &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;ruby-identifier&quot;&gt;lines&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;f&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;readlines&lt;/span&gt;[&lt;span class=&quot;ruby-ivar&quot;&gt;@first_line&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-ivar&quot;&gt;@last_line&lt;/span&gt;]
&lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;ruby-identifier&quot;&gt;lines&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>    &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;method-i-read_text&quot; class=&quot;method-detail &quot;&gt;

  &lt;div class=&quot;method-heading&quot;&gt;
    &lt;span class=&quot;method-name&quot;&gt;read_text&lt;/span&gt;&lt;span
      class=&quot;method-args&quot;&gt;()&lt;/span&gt;

    &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/span&gt;

  &lt;/div&gt;

  &lt;div class=&quot;method-description&quot;&gt;

    &lt;div class=&quot;method-source-code&quot; id=&quot;read_text-source&quot;&gt;
      &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/rails_embed_editor/file_manager.rb, line 33&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-identifier”&gt;read_text&lt;/span&gt;</p>

<pre>&lt;span class=&quot;ruby-identifier&quot;&gt;read_lines&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;join&lt;/span&gt;()</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>    &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;method-i-save_lines&quot; class=&quot;method-detail &quot;&gt;

  &lt;div class=&quot;method-heading&quot;&gt;
    &lt;span class=&quot;method-name&quot;&gt;save_lines&lt;/span&gt;&lt;span
      class=&quot;method-args&quot;&gt;(lines)&lt;/span&gt;

    &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/span&gt;

  &lt;/div&gt;

  &lt;div class=&quot;method-description&quot;&gt;

    &lt;div class=&quot;method-source-code&quot; id=&quot;save_lines-source&quot;&gt;
      &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/rails_embed_editor/file_manager.rb, line 41&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-identifier”&gt;save_lines&lt;/span&gt;(&lt;span
class=“ruby-identifier”&gt;lines&lt;/span&gt;)</p>

<pre>&lt;span class=&quot;ruby-identifier&quot;&gt;all_lines&lt;/span&gt; = []
&lt;span class=&quot;ruby-constant&quot;&gt;File&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@filename&lt;/span&gt;, &lt;span class=&quot;ruby-string&quot;&gt;'r'&lt;/span&gt;) &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;ruby-identifier&quot;&gt;all_lines&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;f&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;readlines&lt;/span&gt;
&lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;ruby-identifier&quot;&gt;all_lines&lt;/span&gt; = &lt;span class=&quot;ruby-identifier&quot;&gt;all_lines&lt;/span&gt;[&lt;span class=&quot;ruby-value&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ruby-ivar&quot;&gt;@first_line&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;ruby-value&quot;&gt;1&lt;/span&gt;] &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;lines&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;ruby-identifier&quot;&gt;all_lines&lt;/span&gt;[&lt;span class=&quot;ruby-ivar&quot;&gt;@last_line&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;ruby-value&quot;&gt;-1&lt;/span&gt;]
&lt;span class=&quot;ruby-constant&quot;&gt;File&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;ruby-ivar&quot;&gt;@filename&lt;/span&gt;, &lt;span class=&quot;ruby-string&quot;&gt;'w'&lt;/span&gt;) &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;ruby-identifier&quot;&gt;all_lines&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;ruby-keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;ruby-identifier&quot;&gt;f&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;write&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;line&lt;/span&gt;)
  &lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;ruby-keyword&quot;&gt;end&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>    &lt;/div&gt;

  &lt;/div&gt;

&lt;/div&gt;

&lt;div id=&quot;method-i-save_text&quot; class=&quot;method-detail &quot;&gt;

  &lt;div class=&quot;method-heading&quot;&gt;
    &lt;span class=&quot;method-name&quot;&gt;save_text&lt;/span&gt;&lt;span
      class=&quot;method-args&quot;&gt;(text)&lt;/span&gt;

    &lt;span class=&quot;method-click-advice&quot;&gt;click to toggle source&lt;/span&gt;

  &lt;/div&gt;

  &lt;div class=&quot;method-description&quot;&gt;

    &lt;div class=&quot;method-source-code&quot; id=&quot;save_text-source&quot;&gt;
      &lt;pre&gt;&lt;span class=&quot;ruby-comment&quot;&gt;# File lib/rails_embed_editor/file_manager.rb, line 37&lt;/span&gt;</pre>

<p>&lt;span class=“ruby-keyword”&gt;def&lt;/span&gt; &lt;span
class=“ruby-identifier”&gt;save_text&lt;/span&gt;(&lt;span
class=“ruby-identifier”&gt;text&lt;/span&gt;)</p>

<pre>&lt;span class=&quot;ruby-identifier&quot;&gt;save_lines&lt;/span&gt;(&lt;span class=&quot;ruby-identifier&quot;&gt;text&lt;/span&gt;.&lt;span class=&quot;ruby-identifier&quot;&gt;split&lt;/span&gt;(&lt;span class=&quot;ruby-regexp&quot;&gt;/\r?\n/&lt;/span&gt;).&lt;span class=&quot;ruby-identifier&quot;&gt;map&lt;/span&gt; { &lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;ruby-identifier&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;ruby-operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;ruby-node&quot;&gt;&amp;quot;#{x}\n&amp;quot;&lt;/span&gt; })</pre>

<p>&lt;span class=“ruby-keyword”&gt;end&lt;/span&gt;&lt;/pre&gt;</p>

<pre>        &lt;/div&gt;

      &lt;/div&gt;

    &lt;/div&gt;

  &lt;/section&gt;

&lt;/section&gt;</pre>

<p>&lt;/main&gt;</p>

<p>&lt;footer id=“validator-badges” role=“contentinfo”&gt;</p>

<pre>&lt;p&gt;&lt;a href=&quot;http://validator.w3.org/check/referer&quot;&gt;Validate&lt;/a&gt;
&lt;p&gt;Generated by &lt;a href=&quot;http://rdoc.rubyforge.org&quot;&gt;RDoc&lt;/a&gt; 4.1.1.
&lt;p&gt;Based on &lt;a href=&quot;http://deveiate.org/projects/Darkfish-Rdoc/&quot;&gt;Darkfish&lt;/a&gt; by &lt;a href=&quot;http://deveiate.org&quot;&gt;Michael Granger&lt;/a&gt;.</pre>

<p>&lt;/footer&gt;</p>
</main>



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