Sha256: 658dddfb5538d136c10f46c68f9a3c475828721b68e72121f5e4a9ff72e823e3

Contents?: true

Size: 1017 Bytes

Versions: 62

Compression:

Stored size: 1017 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/feeds"

module Renalware
  module Feeds
    module Files
      module Practices
        class CSVOrganisation
          include Virtus.model
          attribute :code, String
          attribute :name, String
          attribute :telephone, String
          attribute :street_1, String
          attribute :street_2, String
          attribute :street_3, String
          attribute :city, String
          attribute :county, String
          attribute :postcode, String
          attribute :region, String # used to capture England, Wales etc
          attribute :country_id, Integer # will normally be id for United Kingdom country
          attribute :roles
          attribute :active
          attribute :skip, Boolean

          def self.headers
            attribute_set.map(&:name) - [:roles, :skip]
          end

          def to_a
            self.class.headers.map{ |key| public_send(key) }
          end
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
renalware-core-2.0.77 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.76 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.75 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.74 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.73 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.72 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.71 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.70 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.69 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.68 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.67 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.64 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.63 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.62 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.61 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.60 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.58 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.57 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.56 app/models/renalware/feeds/files/practices/csv_organisation.rb
renalware-core-2.0.55 app/models/renalware/feeds/files/practices/csv_organisation.rb