YUKI Hiroshi
null+****@clear*****
Wed Feb 12 17:04:09 JST 2014
YUKI Hiroshi 2014-02-12 17:04:09 +0900 (Wed, 12 Feb 2014) New Revision: 5b38fc9194e0664ec84d67d770c86fd2104a550a https://github.com/droonga/fluent-plugin-droonga/commit/5b38fc9194e0664ec84d67d770c86fd2104a550a Message: Extract method to validate catalog itself Modified files: lib/droonga/catalog/base.rb Modified: lib/droonga/catalog/base.rb (+8 -4) =================================================================== --- lib/droonga/catalog/base.rb 2014-02-12 17:03:04 +0900 (560bd5e) +++ lib/droonga/catalog/base.rb 2014-02-12 17:04:09 +0900 (0c1fea0) @@ -68,10 +68,7 @@ module Droonga @path = path @base_path = File.dirname(path) - validate_effective_date - validate_zones - validate_farms - validate_datasets + validate @data["datasets"].each do |name, dataset| number_of_partitions = dataset["number_of_partitions"] @@ -189,6 +186,13 @@ module Droonga end end + def validate + validate_effective_date + validate_zones + validate_farms + validate_datasets + end + def validate_parameter_type(expected, value, name) unless value.is_a?(expected) raise MismatchedParameterType.new(name, -------------- next part -------------- HTML����������������������������... Descargar