Skip to content

Instantly share code, notes, and snippets.

@waseem
Forked from anonymous/gist:5209780
Last active December 15, 2015 05:29
Show Gist options
  • Save waseem/5209825 to your computer and use it in GitHub Desktop.
Save waseem/5209825 to your computer and use it in GitHub Desktop.
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