Skip to content

Instantly share code, notes, and snippets.

@zph
Created May 30, 2013 03:19
Show Gist options
  • Save zph/5675539 to your computer and use it in GitHub Desktop.
Save zph/5675539 to your computer and use it in GitHub Desktop.
# require 'rubygems' # not necessary with ruby 1.9 but included for completeness
# require 'twilio-ruby'
# # put your own credentials here
# account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
# # set up a client to talk to the Twilio REST API
# @client = Twilio.new( account_sid, auth_token )
class BasketBallTeam
def initialize(coach, total_number_of_players, jersey_colors)
@coach = coach
@total_number_of_players = total_number_of_players
@jersey_colors = jersey_colors
end
def coach_first_name
@coach.split[0]
end
def coach_last_name
@coach.split[1]
end
end
bulls = BasketBallTeam.new("Phil Jackson", 12, ["red", "black", "white"])
require'pry';binding.pry
# lakers = BasketBallTeam.new(:coach => "Mike Dantoni",
# :total_number_of_players => 12,
# :jersey_colors => ["purple", "gold"]
# )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment