Kouhei Sutou
null+****@clear*****
Tue Oct 21 15:33:08 JST 2014
Kouhei Sutou 2014-10-21 15:33:08 +0900 (Tue, 21 Oct 2014) New Revision: 805cc6b15e6177b85499a09e4f2ecd424ab68b3b https://github.com/groonga/fluent-plugin-groonga/commit/805cc6b15e6177b85499a09e4f2ecd424ab68b3b Message: Move common used method to up Modified files: lib/fluent/plugin/out_groonga.rb Modified: lib/fluent/plugin/out_groonga.rb (+13 -13) =================================================================== --- lib/fluent/plugin/out_groonga.rb 2014-10-20 18:41:05 +0900 (9428cee) +++ lib/fluent/plugin/out_groonga.rb 2014-10-21 15:33:08 +0900 (05c0634) @@ -181,19 +181,6 @@ module Fluent end private - def time_values? - now = Time.now.to_i - year_in_seconds = 365 * 24 * 60 * 60 - window = 10 * year_in_seconds - new = now + window - old = now - window - recent_range = old..new - @sample_values.all? do |sample_value| - sample_value.is_a?(Integer) and - recent_range.cover?(sample_value) - end - end - def integer_value?(value) case value when String @@ -210,6 +197,19 @@ module Fluent end end + def time_values? + now = Time.now.to_i + year_in_seconds = 365 * 24 * 60 * 60 + window = 10 * year_in_seconds + new = now + window + old = now - window + recent_range = old..new + @sample_values.all? do |sample_value| + sample_value.is_a?(Integer) and + recent_range.cover?(sample_value) + end + end + def int32_values? int32_min = -(2 ** 31) int32_max = 2 ** 31 - 1 -------------- next part -------------- HTML����������������������������...Download