mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
15 lines
254 B
Ruby
15 lines
254 B
Ruby
class Brewery < ApplicationRecord
|
|
has_many :beers
|
|
|
|
def print_report
|
|
puts name
|
|
puts "established at year #{year}"
|
|
puts "number of beers #{beers.count}"
|
|
end
|
|
|
|
def restart
|
|
self.year = 2023
|
|
puts "changed year to #{2023}"
|
|
end
|
|
end
|