Kouhei Sutou
null+****@clear*****
Mon Aug 8 11:31:22 JST 2016
Kouhei Sutou 2016-08-08 11:31:22 +0900 (Mon, 08 Aug 2016) New Revision: bd26bc6ef757e03edf375f795bcdce6951a00388 https://github.com/groonga/groonga-command/commit/bd26bc6ef757e03edf375f795bcdce6951a00388 Message: Add ColumnRemove#table and ColumnRemove#name Modified files: lib/groonga/command/column-remove.rb test/command/test-column-remove.rb Modified: lib/groonga/command/column-remove.rb (+15 -3) =================================================================== --- lib/groonga/command/column-remove.rb 2016-08-08 11:30:53 +0900 (05c10f7) +++ lib/groonga/command/column-remove.rb 2016-08-08 11:31:22 +0900 (355e7b3) @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2012-2016 Kouhei Sutou <kou �� clear-code.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -35,6 +33,20 @@ module Groonga end Command.register(command_name, self) + + # @return [String] The table name of the column. + # + # @since 1.2.4 + def table + self[:table] + end + + # @return [String] The column name. + # + # @since 1.2.4 + def name + self[:name] + end end end end Modified: test/command/test-column-remove.rb (+17 -3) =================================================================== --- test/command/test-column-remove.rb 2016-08-08 11:30:53 +0900 (4881e17) +++ test/command/test-column-remove.rb 2016-08-08 11:31:22 +0900 (0d71e0f) @@ -1,6 +1,4 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 Kouhei Sutou <kou �� clear-code.com> +# Copyright (C) 2012-2016 Kouhei Sutou <kou �� clear-code.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -36,4 +34,20 @@ class ColumnRemoveCommandTest < Test::Unit::TestCase command.arguments) end end + + class TableTest < self + def test_reader + command = column_remove_command({"table" => "Logs"}) + assert_equal("Logs", + command.table) + end + end + + class NameTest < self + def test_reader + command = column_remove_command({"name" => "message"}) + assert_equal("message", + command.name) + end + end end -------------- next part -------------- HTML����������������������������...Download