Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #1542

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open

Done #1542

Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9525d21
Done.
das11706 Apr 17, 2019
ab94d54
Done.
das11706 Apr 17, 2019
f1e68ea
Done.
das11706 Apr 18, 2019
f34d188
Done.
das11706 Apr 18, 2019
e66a448
Done.
das11706 Apr 18, 2019
e66742f
Done.
das11706 Apr 20, 2019
0a6cf82
Done.
das11706 Apr 20, 2019
abed3bb
Done.
das11706 Apr 20, 2019
b0a72bd
Done.
das11706 Apr 20, 2019
f4657a6
Done.
das11706 Apr 21, 2019
881d9ed
Done.
das11706 Apr 21, 2019
e0cc073
Done.
das11706 Apr 21, 2019
adc629d
Done.
das11706 Apr 22, 2019
6f6308f
Done.
das11706 Apr 22, 2019
11648fd
Done.
das11706 Apr 22, 2019
b8906e3
Done.
das11706 Apr 22, 2019
43b5336
Done.
das11706 Apr 23, 2019
4f9f053
Done.
das11706 Apr 23, 2019
f0e10ce
Done.
das11706 Apr 23, 2019
4338885
Done.
das11706 Apr 23, 2019
31dede4
Done.
das11706 Apr 24, 2019
10df8b0
Done.
das11706 Apr 25, 2019
d28858d
Done.
das11706 Apr 25, 2019
7d663ca
Done.
das11706 Apr 26, 2019
b00668f
Done.
das11706 Apr 26, 2019
054218d
Done.
das11706 Apr 26, 2019
388baa3
Done.
das11706 Apr 26, 2019
8da7142
Done.
das11706 Apr 26, 2019
a39940a
Done.
das11706 Apr 27, 2019
7f2746a
Done.
das11706 Apr 27, 2019
0911a8f
Done.
das11706 Apr 27, 2019
36ba98a
Done.
das11706 Apr 27, 2019
5722541
Done.
das11706 Apr 27, 2019
2e843b0
Done.
das11706 Apr 28, 2019
c923e88
Done.
das11706 Apr 28, 2019
a0220b4
Done.
das11706 Apr 29, 2019
07d2893
Done.
das11706 Apr 29, 2019
b124f93
Done.
das11706 Apr 29, 2019
20c6d57
Done.
das11706 Apr 29, 2019
908a5b9
Done.
das11706 Apr 30, 2019
1986d5f
Done.
das11706 May 1, 2019
ed989a0
Done.
das11706 May 1, 2019
468d724
Done.
das11706 May 1, 2019
9e723e3
Done.
das11706 May 1, 2019
11a771a
Done.
das11706 May 1, 2019
ef812da
Done.
das11706 May 3, 2019
86d516c
Done.
das11706 May 3, 2019
653adda
Done.
das11706 May 4, 2019
6e03138
Done.
das11706 May 4, 2019
131e9e2
Done.
das11706 May 4, 2019
02fd289
Done.
das11706 May 6, 2019
86a0655
Done.
das11706 May 6, 2019
c92b635
Done.
das11706 May 6, 2019
c9e69aa
Done.
das11706 May 7, 2019
342c487
Done.
das11706 May 8, 2019
b117796
Done.
das11706 May 8, 2019
2dab35a
Done.
das11706 May 9, 2019
e68094a
Done.
das11706 May 9, 2019
6742009
Done.
das11706 May 9, 2019
fd66a98
Done.
das11706 May 11, 2019
bc6e8dd
Done.
das11706 May 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Done.
  • Loading branch information
das11706 committed Apr 22, 2019
commit 11648fd8f90cbb38d77f28a01d443acc86f6c3d5
34 changes: 8 additions & 26 deletions lib/artist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,19 @@ def save
@@all << self
end

# def self.find_or_create_by_name(name)
# if @@all.detect { |a| a.instance_variable_get(:@name) }
# else artist = Artist.new(name)
# end
# end



# def add_song_by_name(name)
# song = Song.new(name)
# @songs << song
# song.artist = self
# end

# binding.pry

# This class method should take the name that is passed in (remember, it will be a string), and do one of two things.
# 1. Find the artist instance that has that name
# or
# 2. create one if it doesn't exist.
# Either way, the return value of the method will be an instance of an artist with the name attribute filled out.


def self.find_or_create_by_name(name)
# if @@all.include?(self.name)
# self.name
if self.name == self.name
@@all.detect { |a| a.instance_variable_get(:@name) }
elsif self.name.nil?
artist = Artist.new(name)
artist
end
end
if self.name.eql?(self.name)
# if self.name == self.name
@@all.detect { |a| a.instance_variable_get(:@name) }
else Artist.new(name)
# artist
end
end
# binding.pry
end