[Groonga-commit] groonga/groonga at 7ad7c2a [master] mrb: support output from mruby plugin

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Feb 2 14:49:36 JST 2015


Kouhei Sutou	2015-02-02 14:49:36 +0900 (Mon, 02 Feb 2015)

  New Revision: 7ad7c2a7d6e23d9af03bc84427bb675d6e225f65
  https://github.com/groonga/groonga/commit/7ad7c2a7d6e23d9af03bc84427bb675d6e225f65

  Message:
    mrb: support output from mruby plugin

  Modified files:
    lib/mrb/scripts/command.rb

  Modified: lib/mrb/scripts/command.rb (+9 -1)
===================================================================
--- lib/mrb/scripts/command.rb    2015-02-02 14:49:20 +0900 (a88f34a)
+++ lib/mrb/scripts/command.rb    2015-02-02 14:49:36 +0900 (df69175)
@@ -12,13 +12,21 @@ module Groonga
     end
 
     private
+    def context
+      @context ||= Context.instance
+    end
+
     def run_internal(input)
       begin
         run_body(input)
       rescue => error
-        Context.instance.record_error(:command_error, error)
+        context.record_error(:command_error, error)
         nil
       end
     end
+
+    def output(object)
+      context.output(object)
+    end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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