Sha256: 141f68d48afdb122eb6bdb269d463c276d7c0f8d4554ca15ed04ce149ee19efd

Contents?: true

Size: 510 Bytes

Versions: 17

Compression:

Stored size: 510 Bytes

Contents

require_dependency "renalware/feeds"

module Renalware
  module Feeds
    module Files
      module Practices
        class CSVFile
          include Virtus.model
          attribute :dir, Pathname

          def create
            path = ::File.join(dir, "practices.csv")
            CSV.open(path, "wb", quote_char: '"', force_quotes: false) do |csv|
              csv << CSVOrganisation.headers
              yield(csv)
            end
            path
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
renalware-core-2.0.8 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.7 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.5 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.4 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.3 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.2 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.1 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc13 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc11 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc10 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc9 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc8 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc7 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc6 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc5 app/models/renalware/feeds/files/practices/csv_file.rb
renalware-core-2.0.0.pre.rc4 app/models/renalware/feeds/files/practices/csv_file.rb