Class: PostcodeValidation::Domain::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/postcode_validation/domain/address.rb

Instance Method Summary collapse

Constructor Details

#initialize(row:, key:) ⇒ Address

Returns a new instance of Address.



4
5
6
7
# File 'lib/postcode_validation/domain/address.rb', line 4

def initialize(row:, key:)
  @row = row
  @key = key
end

Instance Method Details

#idObject



13
14
15
# File 'lib/postcode_validation/domain/address.rb', line 13

def id
  row['Id']
end

#labelObject



9
10
11
# File 'lib/postcode_validation/domain/address.rb', line 9

def label
  "#{row['Text']}, #{row['Description']}"
end