-
-
Save waseem/5209825 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Company | |
attr_reader :title | |
def initialize(title) | |
@title = title.capitalize | |
@users = [] | |
end | |
def add_company_name(new_comp) | |
@title = new_comp | |
end | |
def add_user(a_user) | |
@players.push(a_user) | |
end | |
end | |
print "Whats the company name" | |
new_comp = gets.chomp | |
company = Company.new(new_comp) | |
puts " The company name is #{company.title}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment