Sha256: cec6b00baffb3d522400552ece2097704a7a326b6ee57f9c2260de14808a75dd

Contents?: true

Size: 836 Bytes

Versions: 7

Compression:

Stored size: 836 Bytes

Contents

# frozen_string_literal: true

module SmarterCSV
  class << self
    attr_reader :has_rails, :csv_line_count, :chunk_count, :errors, :file_line_count, :headers, :raw_header, :result, :warnings

    def initialize_variables
      @has_rails = !!defined?(Rails)
      @csv_line_count = 0
      @chunk_count = 0
      @errors = {}
      @file_line_count = 0
      @headerA = []
      @headers = nil
      @raw_header = nil # header as it appears in the file
      @result = []
      @warnings = {}
      @enforce_utf8 = false # only set to true if needed (after options parsing)
    end

    # :nocov:
    # rubocop:disable Naming/MethodName
    def headerA
      warn "Deprecarion Warning: 'headerA' will be removed in future versions. Use 'headders'"
      @headerA
    end
    # rubocop:enable Naming/MethodName
    # :nocov:
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
smarter_csv-1.11.2 lib/smarter_csv/variables.rb
smarter_csv-1.11.1 lib/smarter_csv/variables.rb
smarter_csv-1.11.0 lib/smarter_csv/variables.rb
smarter_csv-1.10.3 lib/smarter_csv/variables.rb
smarter_csv-1.10.2 lib/smarter_csv/variables.rb
smarter_csv-1.10.1 lib/smarter_csv/variables.rb
smarter_csv-1.10.0 lib/smarter_csv/variables.rb