class WebsiteWorth::User
Attributes
name[R]
Public Class Methods
gives_a_site_name()
click to toggle source
# File lib/website_worth/user.rb, line 15 def self.gives_a_site_name while true user_choice = gets.chomp.downcase.to_s if user_choice == "" print "\nPlease enter a valid website name: " next else break end end user_choice end
new(name)
click to toggle source
responsible for providing his/her name and the necessary info to scrape
# File lib/website_worth/user.rb, line 7 def initialize(name) if name == "" @name = "User" else @name = name[0].upcase + name[1..-1].downcase end end