bernard-kanyolo / checkpoint-one-music-library Goto Github PK
View Code? Open in Web Editor NEWRuby Checkpoint One (Music Library)
Ruby Checkpoint One (Music Library)
Genres can respond to #artists by gathering them from the songs they hold
Calling .import on MusicImporter should import all the files from the library and create the song objects (use #files, pass #files into song constructors)
Passing an Artist to song calls #add_song on Artist straight after initialization
Song, Artist, Genre classes respond to #save method and add their respective instances to @@ALL class variable
path is optional, default is ./db/mp3s
creates MusicImporter class and calls ,import on it, with the relevant path
Song should respond to .find_or_create_by_name
Artist/Song/Genre class empties @@ALL via .destroy_all method
Songs can be optionally initialized with a genre
creating these models should set the name property accordingly
Song.new("Blank Space").name #=> "Blank Space"`
Genres get initialized with an empty list of songs and can hold many songs
-probably need #add_song method as well?? **
-Need to reexamine what it means for (song1 == song2)
MusicImporter responds to #files method to return all the filenames in path
Every artist can respond to #genres by gathering genres from the songs they hold
MusicImporter can be initialized with a path and creates a path variable
Artist class should hold many songs, by responding to #add_song method on instance.
.new_from_filename creates a song based on the given filename and .create_from_filename also saves it to @@ALL calss variable
Song, Artist, Genre respond to .create and does a .new and .save simulatenously
Song should respond to .find_by_name method
-By adding this module to Genre and Artist classes, the classes should respond to #find_by_name and #find_or_create_by_name methods through their .all methods
MusicLibraryController responds to #call which starts the CLI and waits for the user input:
-list songs
-list artists
-list genres
-play song <>
-list artist <>
-list genre <>
-exit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.