[Groonga-commit] ranguba/chupa-text at 1218f6c [master] Make internal methods private

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jan 4 19:04:06 JST 2014


Kouhei Sutou	2014-01-04 19:04:06 +0900 (Sat, 04 Jan 2014)

  New Revision: 1218f6ce8407bf826a938b12b2900f82974e855d
  https://github.com/ranguba/chupa-text/commit/1218f6ce8407bf826a938b12b2900f82974e855d

  Message:
    Make internal methods private

  Modified files:
    test/test-file-content.rb

  Modified: test/test-file-content.rb (+11 -10)
===================================================================
--- test/test-file-content.rb    2014-01-04 19:03:31 +0900 (3391339)
+++ test/test-file-content.rb    2014-01-04 19:04:06 +0900 (6c6532a)
@@ -19,16 +19,6 @@ class TestFileContent < Test::Unit::TestCase
     @file = Tempfile.new(["test-file-content", ".txt"])
   end
 
-  def write(string)
-    @file.write(string)
-    @file.flush
-  end
-
-  def content(string=nil)
-    write(string) if string
-    ChupaText::FileContent.new(@file.path)
-  end
-
   def test_size
     body = "Hello"
     assert_equal(body.bytesize, content(body).size)
@@ -47,4 +37,15 @@ class TestFileContent < Test::Unit::TestCase
     body = "Hello"
     assert_equal(body, content(body).open {|file| file.read})
   end
+
+  private
+  def write(string)
+    @file.write(string)
+    @file.flush
+  end
+
+  def content(string=nil)
+    write(string) if string
+    ChupaText::FileContent.new(@file.path)
+  end
 end
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index