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.35 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.34 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.33 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.32 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.31 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.30 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.29 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.28 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.27 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.26 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.25 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.24 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb
forest_admin_datasource_toolkit-1.0.0.pre.beta.23 lib/forest_admin_datasource_toolkit/validations/chart_validator.rb