Kouhei Sutou
null+****@clear*****
Fri Mar 14 18:43:30 JST 2014
Kouhei Sutou 2014-03-14 18:43:30 +0900 (Fri, 14 Mar 2014) New Revision: 707f323c6790d8d8401842aa15ff4317f28a179b https://github.com/groonga/groonga-command/commit/707f323c6790d8d8401842aa15ff4317f28a179b Message: Add ColumnCreate#type Modified files: lib/groonga/command/column-create.rb test/command/test-column-create.rb Modified: lib/groonga/command/column-create.rb (+6 -0) =================================================================== --- lib/groonga/command/column-create.rb 2014-03-14 18:41:25 +0900 (0b7a109) +++ lib/groonga/command/column-create.rb 2014-03-14 18:43:30 +0900 (b6831f4) @@ -45,6 +45,12 @@ module Groonga @flags ||= (self[:flags] || "").split(/\s*\|\s*/) end + # @return [String] value type name of the column. + # @since 1.0.7 + def type + self[:type] + end + # @return [Boolean] true if "COLUMN_SCALAR" is specified in {#flags}, # false otherwise. # @since 1.0.3 Modified: test/command/test-column-create.rb (+8 -0) =================================================================== --- test/command/test-column-create.rb 2014-03-14 18:41:25 +0900 (7f80848) +++ test/command/test-column-create.rb 2014-03-14 18:43:30 +0900 (2078a99) @@ -163,6 +163,14 @@ class ColumnCreateCommandTest < Test::Unit::TestCase end end + class TypeTest < self + def test_reader + command = column_create_command({"type" => "ShortText"}) + assert_equal("ShortText", + command.type) + end + end + class SourcesTest < self def test_no_source command = column_create_command -------------- next part -------------- HTML����������������������������...Download