Class: ListScraper::Store

Inherits:
Object
  • Object
show all
Defined in:
lib/storeListScraper/store.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(idnum:, address:, city:, state:, zip:) ⇒ Store

Returns a new instance of Store.



6
7
8
9
10
11
12
13
# File 'lib/storeListScraper/store.rb', line 6

def initialize(idnum:,address:,city:,state:,zip:)
    @idnum = idnum
    @address = address
    @city = city
    @state = state
    @zip = zip
    @@all << self
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



3
4
5
# File 'lib/storeListScraper/store.rb', line 3

def address
  @address
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/storeListScraper/store.rb', line 3

def city
  @city
end

#idnumObject

Returns the value of attribute idnum.



3
4
5
# File 'lib/storeListScraper/store.rb', line 3

def idnum
  @idnum
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/storeListScraper/store.rb', line 3

def state
  @state
end

#zipObject

Returns the value of attribute zip.



3
4
5
# File 'lib/storeListScraper/store.rb', line 3

def zip
  @zip
end

Class Method Details

.allObject



15
16
17
# File 'lib/storeListScraper/store.rb', line 15

def self.all
    @@all
end