Sha256: f5501777a21345546e33232636077508aacdebac51299bd5212f779ef5a1ba64

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

require_relative "hash"

module Ammitto
  class Address
    attr_reader :street, :city, :state, :country, :zip

    def initialize(address)
      address.symbolize_keys!
      @street = address[:street] if address[:street].is_a?(String)
      @city = address[:city] if address[:city].is_a?(String)
      @state = address[:state] if address[:state].is_a?(String)
      @country = address[:country] if address[:country].is_a?(String)
      @zip = address[:zip] if address[:zip].is_a?(String)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ammitto-0.1.0 lib/ammitto/address.rb