[Groonga-commit] droonga/fluent-plugin-droonga at 97388e0 [master] Add Dataset#name

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 21 16:48:34 JST 2014


Kouhei Sutou	2014-03-21 16:48:34 +0900 (Fri, 21 Mar 2014)

  New Revision: 97388e01ddea551466e634fac3fe179df823e26b
  https://github.com/droonga/fluent-plugin-droonga/commit/97388e01ddea551466e634fac3fe179df823e26b

  Message:
    Add Dataset#name

  Modified files:
    lib/droonga/catalog/dataset.rb
    test/unit/catalog/test_dataset.rb

  Modified: lib/droonga/catalog/dataset.rb (+2 -0)
===================================================================
--- lib/droonga/catalog/dataset.rb    2014-03-21 16:18:36 +0900 (9351990)
+++ lib/droonga/catalog/dataset.rb    2014-03-21 16:48:34 +0900 (4bceb29)
@@ -20,6 +20,8 @@ require "droonga/catalog/volume_collection"
 module Droonga
   module Catalog
     class Dataset
+      attr_reader :name
+
       def initialize(name, data)
         @name = name
         @data = data

  Modified: test/unit/catalog/test_dataset.rb (+7 -0)
===================================================================
--- test/unit/catalog/test_dataset.rb    2014-03-21 16:18:36 +0900 (2551d88)
+++ test/unit/catalog/test_dataset.rb    2014-03-21 16:48:34 +0900 (a867c20)
@@ -21,6 +21,13 @@ class CatalogDatasetTest < Test::Unit::TestCase
     Droonga::Catalog::Dataset.new("DatasetName", data)
   end
 
+  class NameTest < self
+    def test_reader
+      dataset = Droonga::Catalog::Dataset.new("DatasetName", {})
+      assert_equal("DatasetName", dataset.name)
+    end
+  end
+
   class NWorkersTest < self
     def test_default
       data = {
-------------- next part --------------
HTML����������������������������...
Download 



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