Skip to content

Commit

Permalink
Remove structured helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
tobischo committed Oct 17, 2023
1 parent b988e6c commit abe5da2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
8 changes: 0 additions & 8 deletions lib/camt_parser/general/postal_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ def initialize(xml_data)
@xml_data = xml_data
end

# @return [Boolean]
def structured?
street_name != "" ||
building_number != "" ||
postal_code != "" ||
town_name != ""
end

# @return [Array<String>]
def lines # May be empty
xml_data.xpath('AdrLine').map do |x|
Expand Down
3 changes: 0 additions & 3 deletions spec/lib/camt_parser/general/postal_address_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
let(:address) { ex_transaction.postal_address }

specify { expect(address.lines).to eq(["Berlin", "Infinite Loop 2", "12345"]) }
specify { expect(address.structured?).to eq(false) }
specify { expect(address.xml_data).to_not be_nil }

context "version 8" do
Expand All @@ -20,7 +19,6 @@

specify { expect(address.lines).to eq(["Hochstrasse 5", "4052 Basel"]) }
specify { expect(address.country).to eq("CH") }
specify { expect(address.structured?).to eq(false) }
specify { expect(address.street_name).to eq("") }
end

Expand All @@ -32,7 +30,6 @@
let(:address) { entity.postal_address }

specify { expect(entity.name).to eq("Rutschmann Pia") }
specify { expect(address.structured?).to eq(true) }
specify { expect(address.street_name).to eq("Marktgasse") }
specify { expect(address.building_number).to eq("28") }
specify { expect(address.postal_code).to eq("9400") }
Expand Down

0 comments on commit abe5da2

Please sign in to comment.