Sha256: 821aaf204da577e7f93c4516f47dbeaef353835491eb8a4a832314c2b623d718

Contents?: true

Size: 376 Bytes

Versions: 1

Compression:

Stored size: 376 Bytes

Contents

module CsvRowModel
  module Concerns
    module CheckOptions
      extend ActiveSupport::Concern

      class_methods do
        def check_options(options)
          invalid_options = options.keys - self::VALID_OPTIONS
          raise ArgumentError.new("Invalid option(s): #{invalid_options}") if invalid_options.present?
          true
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csv_row_model-1.0.0.beta1 lib/csv_row_model/concerns/check_options.rb