Sha256: 223aeb8dd471adf73525b4de44fa80ee37673deac384ce12d7b75b2ca82220c2

Contents?: true

Size: 427 Bytes

Versions: 53

Compression:

Stored size: 427 Bytes

Contents

module ForestAdminDatasourceToolkit
  module Validations
    class ChartValidator
      def self.validate?(condition, result, key_names)
        if condition
          result_keys = result.keys.join(',')
          raise ForestAdminDatasourceToolkit::Exceptions::ForestException,
                "The result columns must be named '#{key_names}' instead of '#{result_keys}'"
        end

        true
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
forest_admin_datasource_toolkit-1.0.0.pre.beta.61 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.60 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.59 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.58 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.57 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.56 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.55 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.54 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.53 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.52 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.45 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.44 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.43 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.42 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.41 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.40 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.39 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.38 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.37 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.36 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb