Locally-stored mock data source class to be used for testing purposes.
(Not documented)
Creates a new TestData object with the given identifier, and either loads the pre-existing data from disk, or creates it.
# File /Users/ged/source/ruby/Arrow/lib/arrow/data-source/test.rb, line 55 55: def initialize( uri, source ) 56: @source = source + "/" + name 57: end
--- SEC00041
--- ""
--- - name: real_source rw: R a_desc: ""
--- - methods: - visibility: public aref: M000384 name: new sourcecode: " <span class=\"ruby-comment cmt\"># File /Users/ged/source/ruby/Arrow/lib/arrow/data-source/test.rb, line 55</span>\n\ 55: <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-identifier\">initialize</span>( <span class=\"ruby-identifier\">uri</span>, <span class=\"ruby-identifier\">source</span> )\n\ 56: <span class=\"ruby-ivar\">@source</span> = <span class=\"ruby-identifier\">source</span> <span class=\"ruby-operator\">+</span> <span class=\"ruby-value str\">"/"</span> <span class=\"ruby-operator\">+</span> <span class=\"ruby-identifier\">name</span>\n\ 57: <span class=\"ruby-keyword kw\">end</span>" m_desc: |- <p> Creates a <a href="TestDataSource.html#M000384">new</a> TestData object with the given identifier, and either loads the pre-existing data from disk, or creates it. </p> params: ( uri, source ) category: Class type: Public - methods: - visibility: public aref: M000385 name: save sourcecode: " <span class=\"ruby-comment cmt\"># File /Users/ged/source/ruby/Arrow/lib/arrow/data-source/test.rb, line 65</span>\n\ 65: <span class=\"ruby-keyword kw\">def</span> <span class=\"ruby-identifier\">save</span> \n\ 66: <span class=\"ruby-identifier\">name</span> = <span class=\"ruby-constant\">File</span>.<span class=\"ruby-identifier\">join</span>(<span class=\"ruby-constant\">TestData</span>.<span class=\"ruby-identifier\">data_path</span>,<span class=\"ruby-ivar\">@source</span>)\n\ 67: <span class=\"ruby-constant\">File</span>.<span class=\"ruby-identifier\">new</span>(<span class=\"ruby-identifier\">name</span>, <span class=\"ruby-value str\">"w"</span>) {<span class=\"ruby-operator\">|</span><span class=\"ruby-identifier\">file</span><span class=\"ruby-operator\">|</span>\n\ 68: <span class=\"ruby-identifier\">file</span>.<span class=\"ruby-identifier\">write</span>(<span class=\"ruby-ivar\">@data</span>.<span class=\"ruby-identifier\">to_yaml</span>)\n\ 69: }\n\ 70: <span class=\"ruby-keyword kw\">end</span>" m_desc: |- <p> Saves the test data to the data directory. </p> params: () category: Instance type: Public
---
--- - name: SVNRev desc: |+ SVN Revision value: "%q$Rev: 437 $" - name: SVNId desc: |+ SVN Id value: "%q$Id: test.rb 437 2008-03-28 00:49:20Z deveiant $"
Generated with the Darkfish Rdoc Generator.