Class: BobaFinder::Boba

Inherits:
Object
  • Object
show all
Defined in:
lib/boba_finder_CLI/boba.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, stars = nil, city = nil, neighborhood = nil, address = nil, telephone = nil) ⇒ Boba

Returns a new instance of Boba.



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/boba_finder_CLI/boba.rb', line 11

def initialize(
  name= nil, stars= nil,
  city= nil, neighborhood= nil,
  address= nil, telephone= nil)
  @name = name
  @stars = stars
  @city = city
  @neighborhood = neighborhood
  @address = address
  @telephone = telephone
  @@all << self
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



3
4
5
# File 'lib/boba_finder_CLI/boba.rb', line 3

def address
  @address
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/boba_finder_CLI/boba.rb', line 3

def city
  @city
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/boba_finder_CLI/boba.rb', line 3

def name
  @name
end

#neighborhoodObject

Returns the value of attribute neighborhood.



3
4
5
# File 'lib/boba_finder_CLI/boba.rb', line 3

def neighborhood
  @neighborhood
end

#starsObject

Returns the value of attribute stars.



3
4
5
# File 'lib/boba_finder_CLI/boba.rb', line 3

def stars
  @stars
end

#telephoneObject

Returns the value of attribute telephone.



3
4
5
# File 'lib/boba_finder_CLI/boba.rb', line 3

def telephone
  @telephone
end

Class Method Details

.bobaObject



7
8
9
# File 'lib/boba_finder_CLI/boba.rb', line 7

def self.boba
  @@all
end

.reset_bobaObject



24
25
26
# File 'lib/boba_finder_CLI/boba.rb', line 24

def self.reset_boba
  @@all = []
end