Browse Source

make methods private

pull/1148/head
Phil Lee 3 years ago
parent
commit
25dbeeef53
  1. 20
      app/services/bulk_upload/lettings/row_parser.rb

20
app/services/bulk_upload/lettings/row_parser.rb

@ -145,16 +145,6 @@ class BulkUpload::Lettings::RowParser
validates :field_97, presence: true validates :field_97, presence: true
validates :field_98, presence: true validates :field_98, presence: true
def attribute_set
@attribute_set ||= instance_variable_get(:@attributes)
end
def validate_data_types
unless attribute_set["field_1"].value_before_type_cast&.match?(/\A\d+\z/)
errors.add(:field_1, :invalid)
end
end
def valid? def valid?
errors.clear errors.clear
@ -179,6 +169,16 @@ class BulkUpload::Lettings::RowParser
private private
def attribute_set
@attribute_set ||= instance_variable_get(:@attributes)
end
def validate_data_types
unless attribute_set["field_1"].value_before_type_cast&.match?(/\A\d+\z/)
errors.add(:field_1, :invalid)
end
end
def postcode_full def postcode_full
"#{field_108} #{field_109}" if field_108 && field_109 "#{field_108} #{field_109}" if field_108 && field_109
end end

Loading…
Cancel
Save