Class: Udongo::EmailVars::Address

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

Instance Method Summary collapse

Constructor Details

#initialize(address) ⇒ Address

Returns a new instance of Address.



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

def initialize(address)
  @address = address
end

Instance Method Details

#to_hash(prefix: 'address') ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/udongo/email_vars/address.rb', line 8

def to_hash(prefix: 'address')
  {
    "#{prefix}.street": @address.street,
    "#{prefix}.number": @address.number,
    "#{prefix}.box": @address.box,
    "#{prefix}.postal": @address.postal,
    "#{prefix}.city": @address.city,
    "#{prefix}.country": @address.country
  }
end