Kouhei Sutou
null+****@clear*****
Mon Feb 8 18:08:55 JST 2016
Kouhei Sutou 2016-02-08 18:08:55 +0900 (Mon, 08 Feb 2016) New Revision: 39df469e2e212f6c98041cf3736cd30d84f97a57 https://github.com/groonga/groonga-command/commit/39df469e2e212f6c98041cf3736cd30d84f97a57 Message: Start to support object_remove TODO: test Added files: lib/groonga/command/object-remove.rb Added: lib/groonga/command/object-remove.rb (+51 -0) 100644 =================================================================== --- /dev/null +++ lib/groonga/command/object-remove.rb 2016-02-08 18:08:55 +0900 (1082e19) @@ -0,0 +1,51 @@ +# Copyright (C) 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 +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +require "groonga/command/base" + +module Groonga + module Command + # A command class that represents `object_remove` command. + # + # @since 1.1.7 + class ObjectRemove < Base + Command.register("object_remove", self) + + class << self + def parameter_names + [ + :name, + :force, + ] + end + end + + # @return [String] `name` parameter value. + # + # @since 1.1.7 + def name + self[:name] + end + + # @return [Boolean] `force` parameter value. + # + # @since 1.1.7 + def force + self[:force] != "yes" + end + end + end +end -------------- next part -------------- HTML����������������������������...Download