$ rails g model User
belongs_to
has_one
| pry(#<Post>):1> nesting | |
| Nesting status: | |
| -- | |
| 0. main (Pry top level) | |
| 1. #<Post> | |
| [5] pry(#<Post>):1> self.to_s | |
| => "#<Post:0x007fcd8f8dfbd0>" | |
| [6] pry(#<Post>):1> self.title = 'some new title' | |
| => "some new title" | |
| [7] pry(#<Post>):1> self.body = 'some new body' |
Player, instantiates it, and assigns it to a global player variable.Player class contains four methods:
constructor()playPause()skipTo()setVolume()constructor() method sets initial values for the currentlyPlaying, playState, volume, and soundObject properties.
currentlyPlaying is set to the first item in album.songs.playState is "stopped".volume is set to the number 80.