Class: Cli
- Inherits:
-
Object
- Object
- Cli
- Defined in:
- lib/snowbowl/cli.rb
Constant Summary collapse
- LINK =
"https://www.montanasnowbowl.com/report.php"
Instance Method Summary collapse
Instance Method Details
#create_report ⇒ Object
9 10 11 12 |
# File 'lib/snowbowl/cli.rb', line 9 def create_report Scraper.scrape_page(LINK) Reports.create_from_scrape(Scraper.all) end |
#exit ⇒ Object
21 22 23 |
# File 'lib/snowbowl/cli.rb', line 21 def exit puts "See ya!" end |
#show_report ⇒ Object
14 15 16 17 18 19 |
# File 'lib/snowbowl/cli.rb', line 14 def show_report report = Reports.all.first puts "#{report.date}".colorize(:red) puts "BASE: #{report.base}".colorize(:green) puts "TOP: #{report.top}".colorize(:green) end |
#start ⇒ Object
4 5 6 7 |
# File 'lib/snowbowl/cli.rb', line 4 def start create_report show_report end |