lib/active_groonga/base.rb in activegroonga-1.0.3 vs lib/active_groonga/base.rb in activegroonga-1.0.4

- old
+ new

@@ -31,10 +31,12 @@ @@configurations = {} cattr_accessor :configurations @@context = nil + cattr_writer :context, :instance_writer => false + @@encoding = "utf8" cattr_reader :encoding, :instance_reader => false class << self def configure(configuration) @@ -108,10 +110,10 @@ def count table.size end def context - Groonga::Context.default + @@context ||= Groonga::Context.default end def encoding=(new_encoding) return if @@encoding == new_encoding @@encoding = new_encoding