Class: BeerBash::BeerMenus::Place
- Inherits:
-
Object
- Object
- BeerBash::BeerMenus::Place
- Defined in:
- lib/beer_bash/beer_menus.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, path) ⇒ Place
constructor
A new instance of Place.
- #on_tap ⇒ Object
- #to_s ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/beer_bash/beer_menus.rb', line 9 def name @name end |
#path ⇒ Object (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_tap ⇒ Object
16 17 18 |
# File 'lib/beer_bash/beer_menus.rb', line 16 def on_tap Scraper.new.taps(path) end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/beer_bash/beer_menus.rb', line 20 def to_s name end |