Class: BeerBash::BeerMenus::Place

Inherits:
Object
  • Object
show all
Defined in:
lib/beer_bash/beer_menus.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path) ⇒ Place

Returns a new instance of Place.



11
12
13
14
# File 'lib/beer_bash/beer_menus.rb', line 11

def initialize(name, path)
  @name = name
  @path = path
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/beer_bash/beer_menus.rb', line 9

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/beer_bash/beer_menus.rb', line 9

def path
  @path
end

Class Method Details

.search(name) ⇒ Object



5
6
7
# File 'lib/beer_bash/beer_menus.rb', line 5

def self.search(name)
  Scraper.new.places(name)
end

Instance Method Details

#on_tapObject



16
17
18
# File 'lib/beer_bash/beer_menus.rb', line 16

def on_tap
  Scraper.new.taps(path)
end

#to_sObject



20
21
22
# File 'lib/beer_bash/beer_menus.rb', line 20

def to_s
  name
end