Sha256: fb014b3d3327727ac769b3ef8fee8fef6e062b9a2a573db1a1eb221eb74e20b2

Contents?: true

Size: 986 Bytes

Versions: 17

Compression:

Stored size: 986 Bytes

Contents

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

17 entries across 17 versions & 1 rubygems

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