Skip to content

learn-co-students/ruby-objects-belong-to-lab-online-web-pt-081219

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Objects Belong To Lab

Objectives

  • Write classes that are related via the "belongs to" relationship.

Instructions

In this lab, you'll be coding a Song and Artist class. A song should belong to an artist. You'll also be coding a Post and Author class. A post should belong to an author.

  • Artists should have a name.
  • Songs should have a title and belong to an artist. A song should be able to tell you the name of its artist:
song.artist.name
  # => "Beyonce"
  • Posts should have a title and belong to an author. A post should be able to tell you the name of its author:
post.author.name
  # => "Hillary"

View Ruby Objects Belong To Lab on Learn.co and start learning to code for free.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages