Class: LearnSprout::Address

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Address

Returns a new instance of Address.



9
10
11
12
13
14
# File 'lib/learnsprout/address.rb', line 9

def initialize(attrs={})
    @city = attrs["city"]
    @state = attrs["state"]
    @street = attrs["street"]
    @zip = attrs["zip"]
end

Instance Attribute Details

#cityObject

Returns the value of attribute city.



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

def city
  @city
end

#stateObject

Returns the value of attribute state.



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

def state
  @state
end

#streetObject

Returns the value of attribute street.



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

def street
  @street
end

#zipObject

Returns the value of attribute zip.



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

def zip
  @zip
end