Class: DarujmeCz::Address

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Address

Returns a new instance of Address.

Parameters:

  • attributes (Hash)


4
5
6
# File 'lib/darujme_cz/address.rb', line 4

def initialize(attributes)
  @source = attributes
end

Instance Method Details

#postal_codeObject

alias



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

def postal_code
  post_code
end

#to_sObject



8
9
10
# File 'lib/darujme_cz/address.rb', line 8

def to_s
  "#{@source['street']}\n#{@source['postCode']} #{@source['city']}\n#{@source['country']}"
end