Skip to content

Instantly share code, notes, and snippets.

@raghubetina
Last active December 16, 2015 01:59
Show Gist options
  • Save raghubetina/5359245 to your computer and use it in GitHub Desktop.
Save raghubetina/5359245 to your computer and use it in GitHub Desktop.
class Student
attr_accessor :name, :photo_url, :section, :twitter
def introduce
return " <li>
<img src='#{self.photo_url}'>
<h3><a href='https://twitter.com/#{self.twitter}'>#{self.name}</a></h3>
</li>"
end
end
# r = Student.new
# r.name = "Raghu Betina"
# r.photo_url = "https://graph.facebook.com/rbetina/picture"
# r.section = "AM"
# r.twitter = "@rbetina717"
# j = Student.new
# j.name = "Jeff Cohen"
# j.photo_url = "https://graph.facebook.com/rbetina/picture"
# j.section = "AM"
# j.twitter = "@jeffcohen"
# students = Array.new
# ## students = []
# students.push(r)
# ## students << r
# students.push(j)
# students.each do |stu|
# puts stu.name
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment